@@ -2012,30 +2012,30 @@ void ConfigCmd::ConfigGet(std::string& ret) {
20122012 EncodeString (&config_body, " disable_auto_compactions" );
20132013 EncodeString (&config_body, g_pika_conf->disable_auto_compactions () ? " true" : " false" );
20142014 }
2015- if (pstd::stringmatch (pattern.data (), " incremental -compact-interval" , 1 ) != 0 ) {
2015+ if (pstd::stringmatch (pattern.data (), " progressive -compact-interval" , 1 ) != 0 ) {
20162016 elements += 2 ;
2017- EncodeString (&config_body, " incremental -compact-interval" );
2018- EncodeNumber (&config_body, g_pika_conf->incremental_compact_interval ());
2017+ EncodeString (&config_body, " progressive -compact-interval" );
2018+ EncodeNumber (&config_body, g_pika_conf->progressive_compact_interval ());
20192019 }
2020- if (pstd::stringmatch (pattern.data (), " incremental -compact-max-files" , 1 ) != 0 ) {
2020+ if (pstd::stringmatch (pattern.data (), " progressive -compact-max-files" , 1 ) != 0 ) {
20212021 elements += 2 ;
2022- EncodeString (&config_body, " incremental -compact-max-files" );
2023- EncodeNumber (&config_body, g_pika_conf->incremental_compact_max_files ());
2022+ EncodeString (&config_body, " progressive -compact-max-files" );
2023+ EncodeNumber (&config_body, g_pika_conf->progressive_compact_max_files ());
20242024 }
2025- if (pstd::stringmatch (pattern.data (), " incremental -compact-max-time-ms" , 1 ) != 0 ) {
2025+ if (pstd::stringmatch (pattern.data (), " progressive -compact-max-time-ms" , 1 ) != 0 ) {
20262026 elements += 2 ;
2027- EncodeString (&config_body, " incremental -compact-max-time-ms" );
2028- EncodeNumber (&config_body, g_pika_conf->incremental_compact_max_time_ms ());
2027+ EncodeString (&config_body, " progressive -compact-max-time-ms" );
2028+ EncodeNumber (&config_body, g_pika_conf->progressive_compact_max_time_ms ());
20292029 }
2030- if (pstd::stringmatch (pattern.data (), " incremental -compact-min-rate" , 1 ) != 0 ) {
2030+ if (pstd::stringmatch (pattern.data (), " progressive -compact-min-rate" , 1 ) != 0 ) {
20312031 elements += 2 ;
2032- EncodeString (&config_body, " incremental -compact-min-rate" );
2033- EncodeNumber (&config_body, g_pika_conf->incremental_compact_min_rate ());
2032+ EncodeString (&config_body, " progressive -compact-min-rate" );
2033+ EncodeNumber (&config_body, g_pika_conf->progressive_compact_min_rate ());
20342034 }
2035- if (pstd::stringmatch (pattern.data (), " incremental -compact-min-file-age" , 1 ) != 0 ) {
2035+ if (pstd::stringmatch (pattern.data (), " progressive -compact-min-file-age" , 1 ) != 0 ) {
20362036 elements += 2 ;
2037- EncodeString (&config_body, " incremental -compact-min-file-age" );
2038- EncodeNumber (&config_body, g_pika_conf->incremental_compact_min_file_age ());
2037+ EncodeString (&config_body, " progressive -compact-min-file-age" );
2038+ EncodeNumber (&config_body, g_pika_conf->progressive_compact_min_file_age ());
20392039 }
20402040 if (pstd::stringmatch (pattern.data (), " compaction-strategy" , 1 ) != 0 ) {
20412041 elements += 2 ;
@@ -2048,8 +2048,8 @@ void ConfigCmd::ConfigGet(std::string& ret) {
20482048 case PikaConf::OldestOrBestDeleteRatioSstCompact:
20492049 cs = " obd-compact" ;
20502050 break ;
2051- case PikaConf::IncrementalCompact :
2052- cs = " incremental -compact" ;
2051+ case PikaConf::ProgressiveCompact :
2052+ cs = " progressive -compact" ;
20532053 break ;
20542054 default :
20552055 cs = " none" ;
@@ -2390,11 +2390,11 @@ void ConfigCmd::ConfigSet(std::shared_ptr<DB> db) {
23902390 " compact-cron" ,
23912391 " compact-interval" ,
23922392 " disable_auto_compactions" ,
2393- " incremental -compact-interval" ,
2394- " incremental -compact-max-files" ,
2395- " incremental -compact-max-time-ms" ,
2396- " incremental -compact-min-rate" ,
2397- " incremental -compact-min-file-age" ,
2393+ " progressive -compact-interval" ,
2394+ " progressive -compact-max-files" ,
2395+ " progressive -compact-max-time-ms" ,
2396+ " progressive -compact-min-rate" ,
2397+ " progressive -compact-min-file-age" ,
23982398 " compaction-strategy" ,
23992399 " slave-priority" ,
24002400 " sync-window-size" ,
@@ -2614,44 +2614,44 @@ void ConfigCmd::ConfigSet(std::shared_ptr<DB> db) {
26142614 }
26152615 g_pika_conf->SetDisableAutoCompaction (value);
26162616 res_.AppendStringRaw (" +OK\r\n " );
2617- } else if (set_item == " incremental -compact-interval" ) {
2617+ } else if (set_item == " progressive -compact-interval" ) {
26182618 if (pstd::string2int (value.data (), value.size (), &ival) == 0 || ival <= 0 ) {
2619- res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'incremental -compact-interval'\r\n " );
2619+ res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'progressive -compact-interval'\r\n " );
26202620 return ;
26212621 }
2622- g_pika_conf->SetIncrementalCompactInterval (static_cast <int >(ival));
2622+ g_pika_conf->SetProgressiveCompactInterval (static_cast <int >(ival));
26232623 res_.AppendStringRaw (" +OK\r\n " );
2624- } else if (set_item == " incremental -compact-max-files" ) {
2624+ } else if (set_item == " progressive -compact-max-files" ) {
26252625 if (pstd::string2int (value.data (), value.size (), &ival) == 0 || ival <= 0 ) {
2626- res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'incremental -compact-max-files'\r\n " );
2626+ res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'progressive -compact-max-files'\r\n " );
26272627 return ;
26282628 }
2629- g_pika_conf->SetIncrementalCompactMaxFiles (static_cast <int >(ival));
2629+ g_pika_conf->SetProgressiveCompactMaxFiles (static_cast <int >(ival));
26302630 res_.AppendStringRaw (" +OK\r\n " );
2631- } else if (set_item == " incremental -compact-max-time-ms" ) {
2631+ } else if (set_item == " progressive -compact-max-time-ms" ) {
26322632 if (pstd::string2int (value.data (), value.size (), &ival) == 0 || ival <= 0 ) {
2633- res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'incremental -compact-max-time-ms'\r\n " );
2633+ res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'progressive -compact-max-time-ms'\r\n " );
26342634 return ;
26352635 }
2636- g_pika_conf->SetIncrementalCompactMaxTimeMs (static_cast <int >(ival));
2636+ g_pika_conf->SetProgressiveCompactMaxTimeMs (static_cast <int >(ival));
26372637 res_.AppendStringRaw (" +OK\r\n " );
2638- } else if (set_item == " incremental -compact-min-rate" ) {
2638+ } else if (set_item == " progressive -compact-min-rate" ) {
26392639 if (pstd::string2int (value.data (), value.size (), &ival) == 0 || ival <= 0 || ival > 100 ) {
2640- res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'incremental -compact-min-rate'\r\n " );
2640+ res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'progressive -compact-min-rate'\r\n " );
26412641 return ;
26422642 }
2643- g_pika_conf->SetIncrementalCompactMinRate (static_cast <int >(ival));
2643+ g_pika_conf->SetProgressiveCompactMinRate (static_cast <int >(ival));
26442644 res_.AppendStringRaw (" +OK\r\n " );
2645- } else if (set_item == " incremental -compact-min-file-age" ) {
2645+ } else if (set_item == " progressive -compact-min-file-age" ) {
26462646 if (pstd::string2int (value.data (), value.size (), &ival) == 0 || ival < 0 ) {
2647- res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'incremental -compact-min-file-age'\r\n " );
2647+ res_.AppendStringRaw (" -ERR Invalid argument \' " + value + " \' for CONFIG SET 'progressive -compact-min-file-age'\r\n " );
26482648 return ;
26492649 }
2650- g_pika_conf->SetIncrementalCompactMinFileAge (static_cast <int >(ival));
2650+ g_pika_conf->SetProgressiveCompactMinFileAge (static_cast <int >(ival));
26512651 res_.AppendStringRaw (" +OK\r\n " );
26522652 } else if (set_item == " compaction-strategy" ) {
26532653 if (value != " full-compact" && value != " obd-compact" &&
2654- value != " incremental -compact" && value != " none" ) {
2654+ value != " progressive -compact" && value != " none" ) {
26552655 res_.AppendStringRaw (" -ERR Invalid argument \' " + value +
26562656 " \' for CONFIG SET 'compaction-strategy'\r\n " );
26572657 return ;
0 commit comments