From ae21d71e94ebe82689aea39359c1661776871d52 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Mon, 11 Apr 2016 19:59:25 -0700 Subject: [PATCH] Fixed a bug in RocksDB Statistics where flush is considered as compaction Summary: Fixed a bug in RocksDB Statistics where flush is considered as compaction Test Plan: unit test Reviewers: sdong, IslamAbdelRahman, rven, kradhakrishnan, andrewkr Reviewed By: andrewkr Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D56271 --- db/flush_job.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/flush_job.cc b/db/flush_job.cc index 51c86e6f6..958c4460c 100644 --- a/db/flush_job.cc +++ b/db/flush_job.cc @@ -300,7 +300,7 @@ Status FlushJob::WriteLevel0Table(const autovector& mems, cfd_->internal_stats()->AddCompactionStats(0 /* level */, stats); cfd_->internal_stats()->AddCFStats(InternalStats::BYTES_FLUSHED, meta->fd.GetFileSize()); - RecordTick(stats_, COMPACT_WRITE_BYTES, meta->fd.GetFileSize()); + RecordTick(stats_, FLUSH_WRITE_BYTES, meta->fd.GetFileSize()); return s; }