Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Massa event cache key ident estimation can be optimized #4816

Open
Leo-Besancon opened this issue Jan 15, 2025 · 0 comments
Open

Massa event cache key ident estimation can be optimized #4816

Leo-Besancon opened this issue Jan 15, 2025 · 0 comments

Comments

@Leo-Besancon
Copy link
Collaborator

Leo-Besancon commented Jan 15, 2025

In case we query events with a filter with slot_start that is after the slot of the last event in the db, the slots_since function returns an Err() variant and we have the following WARN:

2025-01-10T13:56:05.906052Z  WARN massa_event_cache::event_cache: Could not estimate count for key indent: Event - filter_item: SlotStart(Slot { period: 2014222, thread: 15 }): period overflow error

In that case, we also return max_entry_count as the estimate.

In that specific case, we want the estimation to return 0 instead (because we have no events in the given period) to avoid unnecessary work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant