-
Notifications
You must be signed in to change notification settings - Fork 963
[ISSUE 3040] RocksDB segfaulted during CompactionTest #3043
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
Conversation
nicoloboschi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I left a question
| gcStats.getMinorCompactionCounter().inc(); | ||
| minorCompacting.set(false); | ||
| } | ||
| if (force && forceGarbageCollection.compareAndSet(true, false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you move this statement inside the above else if ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. I meant to move under finally, but under different finally.
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
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
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