[ISSUE 3040] RocksDB segfaulted during CompactionTest#3043
Merged
Conversation
nicoloboschi
left a comment
Contributor
There was a problem hiding this comment.
good catch, I left a question
| gcStats.getMinorCompactionCounter().inc(); | ||
| minorCompacting.set(false); | ||
| } | ||
| if (force && forceGarbageCollection.compareAndSet(true, false)) { |
Contributor
There was a problem hiding this comment.
why did you move this statement inside the above else if ?
Contributor
Author
There was a problem hiding this comment.
fixed. I meant to move under finally, but under different finally.
nicoloboschi
approved these changes
Feb 14, 2022
zymap
approved these changes
Feb 15, 2022
StevenLuMT
pushed a commit
to StevenLuMT/bookkeeper
that referenced
this pull request
Feb 16, 2022
Descriptions of the changes in this PR: ### Motivation RocksDB segfaulted during CompactionTest ### Changes RocksDB can segfault if one tries to use it after close. [Shutdown/compaction sequence](apache#3040 (comment)) can lead to such situation. The fix prevents segfault. CompactionTests were updated at some point to use metadata cache and non-cached case is not tested. I added the test suites for this case. Master Issue: apache#3040 Reviewers: Yong Zhang <zhangyong1025.zy@gmail.com>, Nicolò Boschi <boschi1997@gmail.com> This closes apache#3043 from dlg99/fix/issue3040, closes apache#3040
Ghatage
pushed a commit
to sijie/bookkeeper
that referenced
this pull request
Jul 12, 2024
Descriptions of the changes in this PR: ### Motivation RocksDB segfaulted during CompactionTest ### Changes RocksDB can segfault if one tries to use it after close. [Shutdown/compaction sequence](apache#3040 (comment)) can lead to such situation. The fix prevents segfault. CompactionTests were updated at some point to use metadata cache and non-cached case is not tested. I added the test suites for this case. Master Issue: apache#3040 Reviewers: Yong Zhang <zhangyong1025.zy@gmail.com>, Nicolò Boschi <boschi1997@gmail.com> This closes apache#3043 from dlg99/fix/issue3040, closes apache#3040
This file contains hidden or 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
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.
Descriptions of the changes in this PR:
Motivation
RocksDB segfaulted during CompactionTest
Changes
RocksDB can segfault if one tries to use it after close.
Shutdown/compaction sequence can lead to such situation. The fix prevents segfault.
CompactionTests were updated at some point to use metadata cache and non-cached case is not tested.
I added the test suites for this case.
Master Issue: #3040