|
|
|
@ -2271,6 +2271,25 @@ void StressTest::PrintEnv() const { |
|
|
|
|
FLAGS_periodic_compaction_seconds); |
|
|
|
|
fprintf(stdout, "Compaction TTL : %" PRIu64 "\n", |
|
|
|
|
FLAGS_compaction_ttl); |
|
|
|
|
const char* compaction_pri = ""; |
|
|
|
|
switch (FLAGS_compaction_pri) { |
|
|
|
|
case kByCompensatedSize: |
|
|
|
|
compaction_pri = "kByCompensatedSize"; |
|
|
|
|
break; |
|
|
|
|
case kOldestLargestSeqFirst: |
|
|
|
|
compaction_pri = "kOldestLargestSeqFirst"; |
|
|
|
|
break; |
|
|
|
|
case kOldestSmallestSeqFirst: |
|
|
|
|
compaction_pri = "kOldestSmallestSeqFirst"; |
|
|
|
|
break; |
|
|
|
|
case kMinOverlappingRatio: |
|
|
|
|
compaction_pri = "kMinOverlappingRatio"; |
|
|
|
|
break; |
|
|
|
|
case kRoundRobin: |
|
|
|
|
compaction_pri = "kRoundRobin"; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
fprintf(stdout, "Compaction Pri : %s\n", compaction_pri); |
|
|
|
|
fprintf(stdout, "Background Purge : %d\n", |
|
|
|
|
static_cast<int>(FLAGS_avoid_unnecessary_blocking_io)); |
|
|
|
|
fprintf(stdout, "Write DB ID to manifest : %d\n", |
|
|
|
@ -2820,6 +2839,8 @@ void InitializeOptionsFromFlags( |
|
|
|
|
options.max_background_flushes = FLAGS_max_background_flushes; |
|
|
|
|
options.compaction_style = |
|
|
|
|
static_cast<ROCKSDB_NAMESPACE::CompactionStyle>(FLAGS_compaction_style); |
|
|
|
|
options.compaction_pri = |
|
|
|
|
static_cast<ROCKSDB_NAMESPACE::CompactionPri>(FLAGS_compaction_pri); |
|
|
|
|
if (FLAGS_prefix_size >= 0) { |
|
|
|
|
options.prefix_extractor.reset(NewFixedPrefixTransform(FLAGS_prefix_size)); |
|
|
|
|
} |
|
|
|
|