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

Garbage collect buffered events #5

Open
zmitchell opened this issue Sep 8, 2024 · 0 comments
Open

Garbage collect buffered events #5

zmitchell opened this issue Sep 8, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zmitchell
Copy link
Owner

We buffer events so that out of order events aren't thrown away, but we never throw away any events away. This means that the buffer just grows over time with events from processes outside the process tree.

A quick and easy garbage collection strategy is to keep a generational timestamp for each buffered PID that's updated whenever a new event for that PID is buffered. There would be a global timestamp that increments every time a new event is received. Once the PID's timestamp reaches a certain age relative to the global timestamp, we purge that PID and its events from the buffer.

@zmitchell zmitchell added enhancement New feature or request good first issue Good for newcomers labels Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant