From 4171e3db9ba0e288f27ac242d673cb746f99cb89 Mon Sep 17 00:00:00 2001 From: leipeng Date: Fri, 23 Jul 2021 11:38:18 -0700 Subject: [PATCH] CompactionJob::Install(): fix log truncation (#8563) Summary: event log info may be truncated, the default buffer size is 512, this PR changes buffer size to 8192. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8563 Reviewed By: ajkr Differential Revision: D29838229 Pulled By: jay-zhuang fbshipit-source-id: 00c5dea3caff0641a209f02c972e92d65b505f50 --- db/compaction/compaction_job.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/compaction/compaction_job.cc b/db/compaction/compaction_job.cc index bb1d1fef2..071ec6cf8 100644 --- a/db/compaction/compaction_job.cc +++ b/db/compaction/compaction_job.cc @@ -879,7 +879,7 @@ Status CompactionJob::Install(const MutableCFOptions& mutable_cf_options) { UpdateCompactionJobStats(stats); - auto stream = event_logger_->LogToBuffer(log_buffer_); + auto stream = event_logger_->LogToBuffer(log_buffer_, 8192); stream << "job" << job_id_ << "event" << "compaction_finished" << "compaction_time_micros" << stats.micros