|
|
|
@ -2332,7 +2332,7 @@ TEST_P(DBCompactionTestWithParam, LevelCompactionCFPathUse) { |
|
|
|
|
option_vector.emplace_back(DBOptions(options), cf_opt1); |
|
|
|
|
CreateColumnFamilies({"one"},option_vector[1]); |
|
|
|
|
|
|
|
|
|
// Configura CF2 specific paths.
|
|
|
|
|
// Configure CF2 specific paths.
|
|
|
|
|
cf_opt2.cf_paths.emplace_back(dbname_ + "cf2", 500 * 1024); |
|
|
|
|
cf_opt2.cf_paths.emplace_back(dbname_ + "cf2_2", 4 * 1024 * 1024); |
|
|
|
|
cf_opt2.cf_paths.emplace_back(dbname_ + "cf2_3", 1024 * 1024 * 1024); |
|
|
|
@ -2387,13 +2387,16 @@ TEST_P(DBCompactionTestWithParam, LevelCompactionCFPathUse) { |
|
|
|
|
// Check that default column family uses db_paths.
|
|
|
|
|
// And Column family "one" uses cf_paths.
|
|
|
|
|
|
|
|
|
|
// First three 110KB files are not going to second path.
|
|
|
|
|
// After that, (100K, 200K)
|
|
|
|
|
// The compaction in level0 outputs the sst files in level1.
|
|
|
|
|
// The first path cannot hold level1's data(400KB+400KB > 500KB),
|
|
|
|
|
// so every compaction move a sst file to second path. Please
|
|
|
|
|
// refer to LevelCompactionBuilder::GetPathId.
|
|
|
|
|
for (int num = 0; num < 3; num++) { |
|
|
|
|
generate_file(); |
|
|
|
|
} |
|
|
|
|
check_sstfilecount(0, 1); |
|
|
|
|
check_sstfilecount(1, 2); |
|
|
|
|
|
|
|
|
|
// Another 110KB triggers a compaction to 400K file to fill up first path
|
|
|
|
|
generate_file(); |
|
|
|
|
check_sstfilecount(1, 3); |
|
|
|
|
|
|
|
|
|