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 collection of old generations #11

Closed
Rulexec opened this issue Feb 26, 2023 · 1 comment
Closed

Garbage collection of old generations #11

Rulexec opened this issue Feb 26, 2023 · 1 comment
Milestone

Comments

@Rulexec
Copy link
Contributor

Rulexec commented Feb 26, 2023

  • Add first_generaion_id field to collection
  • Initially it is equal to generation_id
  • In background we should watch for the readers in all collections and set first_generation_id to minimal generation_id of the readers
  • User can create reader only with generation_id >= first_generation_id
  • In background read all record keys of generations < first_generation_id, delete all outdated records (for which newer generation_id record present)
  • If there is single record with generation_id < first_generation_id, copy this record with first_generation_id, then delete previous one
  • Delete generations < first_generation_id
@Rulexec
Copy link
Contributor Author

Rulexec commented Aug 14, 2023

Done with ea9e196

@Rulexec Rulexec closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant