From 4b8bb62f0a10078123502478c5715fe784b654e6 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Thu, 18 Jun 2015 10:15:54 -0700 Subject: [PATCH] Don't dump DBOptions for each column family Summary: Currently we dump DBOptions for each column family options we dump. This leads to duplicate lines in our LOG file. This diff fixes that. Test Plan: Check out the LOG Reviewers: sdong, rven, yhchiang Reviewed By: yhchiang Subscribers: IslamAbdelRahman, yoshinorim, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D39729 --- db/column_family.cc | 2 +- include/rocksdb/options.h | 2 ++ util/options.cc | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/db/column_family.cc b/db/column_family.cc index 1d4e01732..ec583f67f 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -340,7 +340,7 @@ ColumnFamilyData::ColumnFamilyData( if (column_family_set_->NumberOfColumnFamilies() < 10) { Log(InfoLogLevel::INFO_LEVEL, ioptions_.info_log, "--------------- Options for column family [%s]:\n", name.c_str()); - options_.Dump(ioptions_.info_log); + options_.DumpCFOptions(ioptions_.info_log); } else { Log(InfoLogLevel::INFO_LEVEL, ioptions_.info_log, "\t(skipping printing options)\n"); diff --git a/include/rocksdb/options.h b/include/rocksdb/options.h index ef61246e2..24927f201 100644 --- a/include/rocksdb/options.h +++ b/include/rocksdb/options.h @@ -1049,6 +1049,8 @@ struct Options : public DBOptions, public ColumnFamilyOptions { void Dump(Logger* log) const; + void DumpCFOptions(Logger* log) const; + // Set appropriate parameters for bulk loading. // The reason that this is a function that returns "this" instead of a // constructor is to enable chaining of multiple similar calls in the future. diff --git a/util/options.cc b/util/options.cc index 111a55d2e..3ffa6e9d4 100644 --- a/util/options.cc +++ b/util/options.cc @@ -497,6 +497,10 @@ void Options::Dump(Logger* log) const { ColumnFamilyOptions::Dump(log); } // Options::Dump +void Options::DumpCFOptions(Logger* log) const { + ColumnFamilyOptions::Dump(log); +} // Options::DumpCFOptions + // // The goal of this method is to create a configuration that // allows an application to write all files into L0 and