diff --git a/db/db_impl.cc b/db/db_impl.cc index 4896d82ba..a6690e9e9 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -4921,9 +4921,10 @@ Status DBImpl::SwitchMemtable(ColumnFamilyData* cfd, WriteContext* context) { new_superversion = new SuperVersion(); } } - Log(InfoLogLevel::DEBUG_LEVEL, db_options_.info_log, - "[%s] New memtable created with log file: #%" PRIu64 "\n", - cfd->GetName().c_str(), new_log_number); + Log(InfoLogLevel::INFO_LEVEL, db_options_.info_log, + "[%s] New memtable created with log file: #%" PRIu64 + ". Immutable memtables: %d.\n", + cfd->GetName().c_str(), new_log_number, cfd->imm()->NumNotFlushed()); mutex_.Lock(); if (!s.ok()) { // how do we fail if we're not creating new log? diff --git a/db/flush_job.cc b/db/flush_job.cc index abe50c35b..8e34df22b 100644 --- a/db/flush_job.cc +++ b/db/flush_job.cc @@ -197,6 +197,7 @@ Status FlushJob::Run(FileMetaData* file_meta) { stream << vstorage->NumLevelFiles(level); } stream.EndArray(); + stream << "immutable_memtables" << cfd_->imm()->NumNotFlushed(); if (measure_io_stats_) { if (prev_perf_level != PerfLevel::kEnableTime) {