Skip to content

Commit 851f0ad

Browse files
committed
fix
1 parent 544925a commit 851f0ad

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pika_conf.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

src/pika_server.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,14 +1151,14 @@ void PikaServer::DoTimingTask() {
11511151
}
11521152

11531153
Status 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
}

0 commit comments

Comments
 (0)