-
Notifications
You must be signed in to change notification settings - Fork 312
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 #1594
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empiredan
force-pushed
the
gc-shared-log
branch
from
September 11, 2023 09:14
ca54784
to
8718310
Compare
empiredan
changed the title
feat(slog): apply and remove shared logs
feat(slog): flush and remove all shared logs for garbage collection
Sep 12, 2023
empiredan
force-pushed
the
gc-shared-log
branch
from
September 12, 2023 13:01
8718310
to
c05bc2d
Compare
acelyc111
reviewed
Sep 12, 2023
acelyc111
reviewed
Sep 19, 2023
acelyc111
reviewed
Sep 19, 2023
acelyc111
approved these changes
Sep 20, 2023
levy5307
approved these changes
Sep 21, 2023
empiredan
added a commit
to empiredan/pegasus
that referenced
this pull request
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
added a commit
to empiredan/pegasus
that referenced
this pull request
Oct 19, 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.
acelyc111
pushed a commit
that referenced
this pull request
Oct 19, 2023
…1594) (#1638) #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.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#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.