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

Add explicit bound to amortized clean-up #2489

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

frederikrothenberger
Copy link
Member

@frederikrothenberger frederikrothenberger commented Jun 3, 2024

This adds an explicit limit to the number of events processed during amortized clean-up (100 events per time window). If more than 100 events need to be cleaned up, then the next call that adds an event will continue where the previous one left off.

Using that, we can (in a future PR) remove the timer based mechanism for pruning data.


🟡 Some screens were changed

This adds an explicit limit to the number of events processed during
amortized clean-up. Using that, we can (in a future PR) remove the timer
based mechanism for pruning data.
Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I added a few comments to better understand the change.

src/internet_identity/src/stats/event_stats.rs Outdated Show resolved Hide resolved
src/internet_identity/src/stats/event_stats.rs Outdated Show resolved Hide resolved
src/internet_identity/src/stats/event_stats/tests.rs Outdated Show resolved Hide resolved
src/internet_identity/src/stats/event_stats.rs Outdated Show resolved Hide resolved
Since the underlying event data is not deleted, the word "prune" is
misleading in the context. It is replaced with "remove from aggregation".
Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@frederikrothenberger frederikrothenberger added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit f7875b8 Jun 4, 2024
65 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/limit-amortized-work branch June 4, 2024 12:34
frederikrothenberger added a commit that referenced this pull request Jun 5, 2024
This removes the timer based pruning that is no longer needed due to #2489.
The prune event aggregations will be removed once II reports their value
to be 0 (i.e. in a subsequent release after the next one).
github-merge-queue bot pushed a commit that referenced this pull request Jun 5, 2024
* Remove timer-based pruning

This removes the timer based pruning that is no longer needed due to #2489.
The prune event aggregations will be removed once II reports their value
to be 0 (i.e. in a subsequent release after the next one).

* 🤖 npm run generate auto-update

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants