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 new method for vacuuming a c1z db. #79

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Add new method for vacuuming a c1z db. #79

merged 1 commit into from
Oct 19, 2023

Conversation

jirwin
Copy link
Contributor

@jirwin jirwin commented Oct 19, 2023

Vacuum after removing old generations of data.

Without this vacuuming, the c1z database will continue to grow in size even though we are removing old data. Vacuuming allows us to reclaim the space used by previous generations, keeping the decompressed file size as small as expected.

return err
}

c.dbUpdated = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to set this to true here, when it is already set from the vacuum call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In practice no, but i think it is probably good to set it in any method that changes the database. This flag being set to true is what tells the c1z manager that it should write the c1z back to the origin. There isn't really a way to run this method without invoking other things that change the database, but for completeness sake I'm setting it.

@jirwin jirwin merged commit df47609 into main Oct 19, 2023
@jirwin jirwin deleted the jirwin/vacuum branch October 19, 2023 21:40
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