From 4bfb5e788a1a6fd92dff20d5f1fa24e26ee3d128 Mon Sep 17 00:00:00 2001 From: 007gzs <007gzs@gmail.com> Date: Fri, 23 Aug 2024 14:01:26 +0800 Subject: [PATCH] fix: target_file_size_base connot set large than 2G (#2880) * target_file_size_base_ to int64_t --- include/pika_conf.h | 4 ++-- src/pika_conf.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pika_conf.h b/include/pika_conf.h index 02e765719e..6941738bcf 100644 --- a/include/pika_conf.h +++ b/include/pika_conf.h @@ -270,7 +270,7 @@ class PikaConf : public pstd::BaseConf { std::shared_lock l(rwlock_); return compression_; } - int target_file_size_base() { + int64_t target_file_size_base() { std::shared_lock l(rwlock_); return target_file_size_base_; } @@ -1027,7 +1027,7 @@ class PikaConf : public pstd::BaseConf { // Critical configure items // bool write_binlog_ = false; - int target_file_size_base_ = 0; + int64_t target_file_size_base_ = 0; int64_t max_compaction_bytes_ = 0; int binlog_file_size_ = 0; diff --git a/src/pika_conf.cc b/src/pika_conf.cc index 9c0f5751af..98468835e8 100644 --- a/src/pika_conf.cc +++ b/src/pika_conf.cc @@ -421,7 +421,7 @@ int PikaConf::Load() { } // target_file_size_base - GetConfIntHuman("target-file-size-base", &target_file_size_base_); + GetConfInt64Human("target-file-size-base", &target_file_size_base_); if (target_file_size_base_ <= 0) { target_file_size_base_ = 1048576; // 10Mb }