File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,12 +357,12 @@ class PikaConf : public pstd::BaseConf {
357357
358358 bool enable_progressive_compact () {
359359 std::shared_lock l (rwlock_);
360- return enable_progressive_compact_ ;
360+ return enable_auto_compact_old_sst_ ;
361361 }
362362
363363 int progressive_compact_interval () {
364364 std::shared_lock l (rwlock_);
365- return progressive_compact_interval_ ;
365+ return auto_compact_old_sst_interval_ ;
366366 }
367367
368368 bool enable_auto_compact_old_sst () {
@@ -1088,7 +1088,7 @@ class PikaConf : public pstd::BaseConf {
10881088 std::string blob_compression_type_ = " none" ;
10891089
10901090 std::unique_ptr<PikaMeta> local_meta_;
1091- std::shared_mutex rwlock_;
1091+ mutable std::shared_mutex rwlock_;
10921092
10931093 // Rsync Rate limiting configuration
10941094 int throttle_bytes_per_second_ = 200 << 20 ; // 200MB/s
Original file line number Diff line number Diff line change @@ -446,17 +446,19 @@ int PikaConf::Load() {
446446 }
447447
448448 // Progressive compact configuration
449- enable_progressive_compact_ = false ; // 默认关闭
449+ enable_auto_compact_old_sst_ = false ; // 默认关闭
450450 std::string enable_pc;
451451 GetConfStr (" enable-progressive-compact" , &enable_pc);
452452 if (enable_pc == " yes" ) {
453- enable_progressive_compact_ = true ;
453+ enable_auto_compact_old_sst_ = true ;
454454 }
455455
456- progressive_compact_interval_ = 90 ; // 默认90秒
457- GetConfInt (" progressive-compact-interval" , &progressive_compact_interval_);
458- if (progressive_compact_interval_ < 1 ) {
459- progressive_compact_interval_ = 90 ;
456+ auto_compact_old_sst_interval_ = 90 ; // 默认90秒
457+ int interval;
458+ GetConfInt (" progressive-compact-interval" , &interval);
459+ auto_compact_old_sst_interval_ = interval;
460+ if (auto_compact_old_sst_interval_ < 1 ) {
461+ auto_compact_old_sst_interval_ = 90 ;
460462 }
461463
462464 GetConfInt (" max-background-flushes" , &max_background_flushes_);
Original file line number Diff line number Diff line change 55
66#include " src/redis.h"
77#include < sstream>
8- #include " rocksdb/column_family .h"
8+ #include " rocksdb/db .h"
99#include " rocksdb/compaction_job_stats.h"
1010#include " glog/logging.h" // 确保LOG宏可用
1111
You can’t perform that action at this time.
0 commit comments