Skip to content

Commit

Permalink
fix: target_file_size_base connot set large than 2G (#2880)
Browse files Browse the repository at this point in the history
* target_file_size_base_ to int64_t
  • Loading branch information
007gzs authored Aug 23, 2024
1 parent 310248a commit 4bfb5e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/pika_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
}
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/pika_conf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4bfb5e7

Please sign in to comment.