From 3366eda83905af6c75999b1bcfa9f74f090b010f Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Tue, 27 Nov 2012 22:10:20 -0800 Subject: [PATCH] Print out status at the end of a compaction run. Summary: Print out status at the end of a compaction run. This helps in debugging. Test Plan: make clean check Reviewers: sheki Reviewed By: sheki Differential Revision: https://reviews.facebook.net/D7035 --- db/db_impl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 4d86cb522..3958614e4 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1458,7 +1458,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) { VersionSet::LevelSummaryStorage tmp; Log(options_.info_log, "compacted to: %s, %.1f MB/sec, level %d, files in(%d, %d) out(%d) " - "MB in(%.1f, %.1f) out(%.1f), amplify(%.1f)\n", + "MB in(%.1f, %.1f) out(%.1f), amplify(%.1f) %s\n", versions_->LevelSummary(&tmp), (stats.bytes_readn + stats.bytes_readnp1 + stats.bytes_written) / (double) stats.micros, @@ -1468,7 +1468,8 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) { stats.bytes_readnp1 / 1048576.0, stats.bytes_written / 1048576.0, (stats.bytes_written + stats.bytes_readnp1) / - (double) stats.bytes_readn); + (double) stats.bytes_readn, + status.ToString().c_str()); return status; }