From 2cabdb8f44614f9d44f9ba90d5524c24bd4f5dcb Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Fri, 9 Dec 2016 11:39:16 -0800 Subject: [PATCH] Increase buffer size Summary: When compiling with GCC>=7.0.0, "db/internal_stats.cc" fails to compile as the data being written to the buffer potentially exceeds its size. This fix simply doubles the size of the buffer, thus accommodating the max possible data size. Closes https://github.com/facebook/rocksdb/pull/1635 Differential Revision: D4302162 Pulled By: yiwu-arbug fbshipit-source-id: c76ad59 --- 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 122e8c9b6..6ecd258a1 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -918,7 +918,7 @@ int InternalStats::DumpCFMapStats( } void InternalStats::DumpCFStats(std::string* value) { - char buf[1000]; + char buf[2000]; // Per-ColumnFamily stats PrintLevelStatsHeader(buf, sizeof(buf), cfd_->GetName()); value->append(buf); -- GitLab