Fix the wrong comment of level compaction cf paths test (#8533)
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/8533 Reviewed By: ajkr Differential Revision: D29718067 fbshipit-source-id: b4b91c9271362e7a7d47ddbaf28f56fb537cc668
This commit is contained in:
parent
543a201b93
commit
e95c570047
@ -2332,7 +2332,7 @@ TEST_P(DBCompactionTestWithParam, LevelCompactionCFPathUse) {
|
|||||||
option_vector.emplace_back(DBOptions(options), cf_opt1);
|
option_vector.emplace_back(DBOptions(options), cf_opt1);
|
||||||
CreateColumnFamilies({"one"},option_vector[1]);
|
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", 500 * 1024);
|
||||||
cf_opt2.cf_paths.emplace_back(dbname_ + "cf2_2", 4 * 1024 * 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);
|
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.
|
// Check that default column family uses db_paths.
|
||||||
// And Column family "one" uses cf_paths.
|
// And Column family "one" uses cf_paths.
|
||||||
|
|
||||||
// First three 110KB files are not going to second path.
|
// The compaction in level0 outputs the sst files in level1.
|
||||||
// After that, (100K, 200K)
|
// 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++) {
|
for (int num = 0; num < 3; num++) {
|
||||||
generate_file();
|
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();
|
generate_file();
|
||||||
check_sstfilecount(1, 3);
|
check_sstfilecount(1, 3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user