Fix DBCompactionTest failure with parallel L0-L1 compactions
Summary: The test SuggestCompactRangeNoTwoLevel0Compactions in DBCompactionTest fails when there are parallel L0-L1 compactions taking place because the test makes sure that only one compaction involving L0 takes place at any given time (since before having parallel compactions this was impossible). I changed the test to only run with DBOptions.max_subcompactions=1 so as to not hit this issue which is not a correctness issue but just an inherent changing of assumptions after introducing parallel compactions. This failed after landing https://reviews.facebook.net/D43269#inline-321303 so now this should fix it Test Plan: make all && make check Reviewers: yhchiang, igor, anthony, noetzli, sdong Reviewed By: sdong Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D46617
This commit is contained in:
parent
8aa1f15197
commit
6db0a939d2
@ -1746,7 +1746,10 @@ TEST_P(DBCompactionTestWithParam, CompressLevelCompaction) {
|
||||
|
||||
// This tests for a bug that could cause two level0 compactions running
|
||||
// concurrently
|
||||
TEST_P(DBCompactionTestWithParam, SuggestCompactRangeNoTwoLevel0Compactions) {
|
||||
// TODO(aekmekji): Make sure that the reason this fails when run with
|
||||
// max_subcompactions > 1 is not a correctness issue but just inherent to
|
||||
// running parallel L0-L1 compactions
|
||||
TEST_F(DBCompactionTest, SuggestCompactRangeNoTwoLevel0Compactions) {
|
||||
Options options = CurrentOptions();
|
||||
options.compaction_style = kCompactionStyleLevel;
|
||||
options.write_buffer_size = 110 << 10;
|
||||
@ -1758,7 +1761,6 @@ TEST_P(DBCompactionTestWithParam, SuggestCompactRangeNoTwoLevel0Compactions) {
|
||||
options.target_file_size_base = 98 << 10;
|
||||
options.max_write_buffer_number = 2;
|
||||
options.max_background_compactions = 2;
|
||||
options.max_subcompactions = max_subcompactions_;
|
||||
|
||||
DestroyAndReopen(options);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user