Re-enable kUniversalSubcompactions option_config (#4125)

Summary:
1. Move kUniversalSubcompactions up before kEnd in db_test_util.h, so
tests that cycle through all the option_configs include this
2. Skip kUniversalSubcompactions wherever kUniversalCompaction and
kUniversalCompactionMultilevel are skipped

Related to #3935
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4125

Differential Revision: D8828637

Pulled By: anand1976

fbshipit-source-id: 650dee15fd27d85281cf9bb4ca8ab460e04cac6f
main
Anand Ananthabhotla 6 years ago committed by Facebook Github Bot
parent 7bee48bdbd
commit e3eba52a5d
  1. 3
      db/db_test_util.cc
  2. 7
      db/db_test_util.h
  3. 3
      db/external_sst_file_test.cc

@ -118,7 +118,8 @@ bool DBTestBase::ShouldSkipOptions(int option_config, int skip_mask) {
if ((skip_mask & kSkipUniversalCompaction) && if ((skip_mask & kSkipUniversalCompaction) &&
(option_config == kUniversalCompaction || (option_config == kUniversalCompaction ||
option_config == kUniversalCompactionMultiLevel)) { option_config == kUniversalCompactionMultiLevel ||
option_config == kUniversalSubcompactions)) {
return true; return true;
} }
if ((skip_mask & kSkipMergePut) && option_config == kMergePut) { if ((skip_mask & kSkipMergePut) && option_config == kMergePut) {

@ -700,14 +700,9 @@ class DBTestBase : public testing::Test {
kBlockBasedTableWithPartitionedIndex, kBlockBasedTableWithPartitionedIndex,
kBlockBasedTableWithPartitionedIndexFormat3, kBlockBasedTableWithPartitionedIndexFormat3,
kPartitionedFilterWithNewTableReaderForCompactions, kPartitionedFilterWithNewTableReaderForCompactions,
kUniversalSubcompactions,
// This must be the last line // This must be the last line
kEnd, kEnd,
// TODO: This option although been there for a while was disable due to a
// mistake. Enabling it makes somem tests to fail. We should enable it and
// fix the unit tests.
kUniversalSubcompactions,
}; };
public: public:

@ -971,7 +971,8 @@ TEST_F(ExternalSSTFileTest, OverlappingRanges) {
s = DeprecatedAddFile({file_name}); s = DeprecatedAddFile({file_name});
auto it = true_data.lower_bound(Key(range_start)); auto it = true_data.lower_bound(Key(range_start));
if (option_config_ != kUniversalCompaction && if (option_config_ != kUniversalCompaction &&
option_config_ != kUniversalCompactionMultiLevel) { option_config_ != kUniversalCompactionMultiLevel &&
option_config_ != kUniversalSubcompactions) {
if (it != true_data.end() && it->first <= Key(range_end)) { if (it != true_data.end() && it->first <= Key(range_end)) {
// This range overlap with data already exist in DB // This range overlap with data already exist in DB
ASSERT_NOK(s); ASSERT_NOK(s);

Loading…
Cancel
Save