From 52d9e5f7b646906c91a346d38b56b28a3cf62f7a Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 23 May 2017 17:07:37 -0700 Subject: [PATCH] Fix column family seconds_up accounting Summary: `cf_stats_snapshot_.seconds_up` appears to be never updated, unlike `db_stats_snapshot_.seconds_up`, which is updated here: https://github.com/facebook/rocksdb/blob/master/db/internal_stats.cc#L883 This leads to wrong information in the log, for example: ``` ** Compaction Stats [default] ** .... Uptime(secs): 85591.2 total, 85591.2 interval ``` Even though DB's interval is correctly logged as 60 seconds: ``` ** DB Stats ** Uptime(secs): 85591.2 total, 637.8 interval ``` Closes https://github.com/facebook/rocksdb/pull/2338 Differential Revision: D5114131 Pulled By: sagar0 fbshipit-source-id: 85243a38213236ccbb601a7f7aaa8865eaa8083c --- db/internal_stats.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index fdb53ade6..c23efd565 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -1139,6 +1139,7 @@ void InternalStats::DumpCFStatsNoFileHistogram(std::string* value) { total_stall_count - cf_stats_snapshot_.stall_count); value->append(buf); + cf_stats_snapshot_.seconds_up = seconds_up; cf_stats_snapshot_.ingest_bytes_flush = flush_ingest; cf_stats_snapshot_.ingest_bytes_addfile = add_file_ingest; cf_stats_snapshot_.ingest_files_addfile = ingest_files_addfile;