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

Limit log cleanup queue #204

Merged
merged 5 commits into from
Apr 24, 2023
Merged

Limit log cleanup queue #204

merged 5 commits into from
Apr 24, 2023

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Apr 20, 2023

On machines with slow fsync it is possible that the log cleanup queue grows to gigabytes while fsync is in progress. This PR add a limit to the cleanup queue, pausing commits if it grows too much,

Also tweaked error handling for the log recovory. If recovery fails for reasons other than the bad log file we keep the log files around, instead of deleting them and hoping fo the best. If replay is successfull, the logs are deleted right away (after fsync), instead of waiting for the database to be closed.

src/db.rs Outdated Show resolved Hide resolved
@arkpar arkpar merged commit 7bd6afc into master Apr 24, 2023
@arkpar arkpar deleted the arkpar/limit-cleanup branch April 24, 2023 08:41
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.

3 participants