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

feat(slog): flush and remove all shared logs for garbage collection (cherry-pick #1594) #1638

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Oct 16, 2023

#1593

In XiaoMi/rdsn#1019 we've written private logs as
WAL instead of shared logs, which also means shared log files would never
be appended with new mutations.

However, obsolete shared logs that had been applied to rocksdb were not
removed since then. There is at least 1 shared log file which is never removed.
We should change this policy of garbage collection, to delete all obsolete
shared log files.

To facilitate the garbage collection of shared log files, we also trigger checkpoints
which would flush rocksdb data to disk for each replica that has prevented shared
log files from being removed for garbage collection. It is necessary to limit the
number of submitted replicas that would be flushed at a time to avoid too much
consumption of I/O resources which might affect the processing of read/write
requests from clients.

This PR is to cherry-pick #1594 into v2.5 to solve issue #1593.

@github-actions github-actions bot added the cpp label Oct 16, 2023
…pache#1594)

apache#1593

In XiaoMi/rdsn#1019 we've written private logs as
WAL instead of shared logs, which also means shared log files would never
be appended with new mutations.

However, obsolete shared logs that had been applied to rocksdb were not
removed since then. There is at least 1 shared log file which is never removed.
We should change this policy of garbage collection, to delete all obsolete
shared log files.

To facilitate the garbage collection of shared log files, we also trigger checkpoints
which would flush rocksdb data to disk for each replica that has prevented shared
log files from being removed for garbage collection. It is necessary to limit the
number of submitted replicas that would be flushed at a time to avoid too much
consumption of I/O resources which might affect the processing of read/write
requests from clients.
@empiredan empiredan changed the title feat(slog): flush and remove all shared logs for garbage collection feat(slog): flush and remove all shared logs for garbage collection (cherry-pick #1594) Oct 19, 2023
@empiredan empiredan added the 2.5 issues and pull requests dedicated to v2.5 label Oct 19, 2023
@acelyc111 acelyc111 merged commit 1a2a7c6 into apache:v2.5 Oct 19, 2023
75 checks passed
@empiredan empiredan mentioned this pull request Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.5 issues and pull requests dedicated to v2.5 cpp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants