From bb69b4ce7f93c9c94ad7719b96299790535e2d78 Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Thu, 12 Nov 2020 17:31:28 -0800 Subject: [PATCH] Fix InternalStats::DumpCFStats (#7666) Summary: https://github.com/facebook/rocksdb/pull/7461 accidentally broke `InternalStats::DumpCFStats` by making `DumpCFFileHistogram` overwrite the output of `DumpCFStatsNoFileHistogram` instead of appending to it, resulting in only the file histogram related information getting logged. The patch fixes this by reverting to appending in `DumpCFFileHistogram`. Fixes https://github.com/facebook/rocksdb/issues/7664 . Pull Request resolved: https://github.com/facebook/rocksdb/pull/7666 Test Plan: Ran `make check` and checked the info log of `db_bench`. Reviewed By: riversand963 Differential Revision: D24929051 Pulled By: ltamasi fbshipit-source-id: 636a3d5ebb5ce23de4f3fe4f03ad3f16cb2858f8 --- db/internal_stats.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index afe3f7141..87ed9c60f 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -1406,7 +1406,7 @@ void InternalStats::DumpCFFileHistogram(std::string* value) { << blob_file_read_latency_.ToString() << '\n'; } - *value = oss.str(); + value->append(oss.str()); } #else -- GitLab