Print compaction_options_universal.stop_style in LOG file

Summary:
Print compaction_options_universal.stop_style in LOG file
./db_bench --benchmarks=fillseq and read the log
Closes https://github.com/facebook/rocksdb/pull/2268

Differential Revision: D5032438

Pulled By: lightmark

fbshipit-source-id: 0e72fcd96a1caaf3cab20e86d39c75fbebf5ce37
main
Aaron Gao 8 years ago committed by Facebook Github Bot
parent 4897eb250b
commit df035b6826
  1. 13
      options/options.cc
  2. 5
      options/options_helper.h

@ -345,6 +345,19 @@ void ColumnFamilyOptions::Dump(Logger* log) const {
log, log,
"Options.compaction_options_universal.compression_size_percent: %d", "Options.compaction_options_universal.compression_size_percent: %d",
compaction_options_universal.compression_size_percent); compaction_options_universal.compression_size_percent);
const auto& it_compaction_stop_style = compaction_stop_style_to_string.find(
compaction_options_universal.stop_style);
std::string str_compaction_stop_style;
if (it_compaction_stop_style == compaction_stop_style_to_string.end()) {
assert(false);
str_compaction_stop_style =
"unknown_" + std::to_string(compaction_options_universal.stop_style);
} else {
str_compaction_stop_style = it_compaction_stop_style->second;
}
ROCKS_LOG_HEADER(log,
"Options.compaction_options_universal.stop_style: %s",
str_compaction_stop_style.c_str());
ROCKS_LOG_HEADER( ROCKS_LOG_HEADER(
log, "Options.compaction_options_fifo.max_table_files_size: %" PRIu64, log, "Options.compaction_options_fifo.max_table_files_size: %" PRIu64,
compaction_options_fifo.max_table_files_size); compaction_options_fifo.max_table_files_size);

@ -37,6 +37,11 @@ static std::map<CompactionPri, std::string> compaction_pri_to_string = {
{kOldestSmallestSeqFirst, "kOldestSmallestSeqFirst"}, {kOldestSmallestSeqFirst, "kOldestSmallestSeqFirst"},
{kMinOverlappingRatio, "kMinOverlappingRatio"}}; {kMinOverlappingRatio, "kMinOverlappingRatio"}};
static std::map<CompactionStopStyle, std::string>
compaction_stop_style_to_string = {
{kCompactionStopStyleSimilarSize, "kCompactionStopStyleSimilarSize"},
{kCompactionStopStyleTotalSize, "kCompactionStopStyleTotalSize"}};
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
Status GetMutableOptionsFromStrings( Status GetMutableOptionsFromStrings(

Loading…
Cancel
Save