File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,14 +446,14 @@ int PikaConf::Load() {
446446 }
447447
448448 // Progressive compact configuration
449- enable_auto_compact_old_sst_ = 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" ) {
453453 enable_auto_compact_old_sst_ = true ;
454454 }
455455
456- auto_compact_old_sst_interval_ = 90 ; // 默认90秒
456+ auto_compact_old_sst_interval_ = 90 ;
457457 int interval;
458458 GetConfInt (" progressive-compact-interval" , &interval);
459459 auto_compact_old_sst_interval_ = interval;
Original file line number Diff line number Diff line change @@ -1151,14 +1151,14 @@ void PikaServer::DoTimingTask() {
11511151}
11521152
11531153Status PikaServer::AutoCompactOldSST () {
1154- // 检查是否启用了渐进式压缩
1154+
11551155 if (!g_pika_conf->enable_auto_compact_old_sst ()) {
11561156 return Status::OK ();
11571157 }
11581158
11591159 static uint64_t last_compact_old_time = 0 ;
11601160 auto current_time = pstd::NowMicros ();
1161- // 使用配置的时间间隔
1161+
11621162 if (current_time - last_compact_old_time < g_pika_conf->auto_compact_old_sst_interval () * 1000 * 1000 ) {
11631163 return Status::OK ();
11641164 }
You can’t perform that action at this time.
0 commit comments