diff --git a/src/server/hotkey_collector.cpp b/src/server/hotkey_collector.cpp index fda14b9646..b06e2345be 100644 --- a/src/server/hotkey_collector.cpp +++ b/src/server/hotkey_collector.cpp @@ -35,7 +35,7 @@ DSN_DEFINE_uint32( "the variance threshold to detect hot bucket during coarse analysis of hotkey detection"); DSN_TAG_VARIABLE(hot_bucket_variance_threshold, FT_MUTABLE); DSN_DEFINE_validator(hot_bucket_variance_threshold, - [](int32_t threshold) -> bool { return threshold >= 0 }); + [](int32_t threshold) -> bool { return threshold >= 0; }); DSN_DEFINE_uint32( "pegasus.server", @@ -44,7 +44,7 @@ DSN_DEFINE_uint32( "the variance threshold to detect hot key during fine analysis of hotkey detection"); DSN_TAG_VARIABLE(hot_key_variance_threshold, FT_MUTABLE); DSN_DEFINE_validator(hot_key_variance_threshold, - [](int32_t threshold) -> bool { return threshold >= 0 }); + [](int32_t threshold) -> bool { return threshold >= 0; }); DSN_DEFINE_uint32("pegasus.server", hotkey_buckets_num, @@ -71,7 +71,7 @@ DSN_DEFINE_uint32( "the max time (in seconds) allowed to capture hotkey, will stop if hotkey's not found"); DSN_TAG_VARIABLE(max_seconds_to_detect_hotkey, FT_MUTABLE); DSN_DEFINE_validator(max_seconds_to_detect_hotkey, - [](int32_t seconds) -> bool { return seconds >= 0 }); + [](int32_t seconds) -> bool { return seconds >= 0; }); // 68–95–99.7 rule, same algorithm as hotspot_partition_calculator::stat_histories_analyse /*extern*/ bool diff --git a/src/server/hotspot_partition_calculator.cpp b/src/server/hotspot_partition_calculator.cpp index f422808e18..0a148f3952 100644 --- a/src/server/hotspot_partition_calculator.cpp +++ b/src/server/hotspot_partition_calculator.cpp @@ -50,14 +50,15 @@ DSN_DEFINE_int32("pegasus.collector", "FLAGS_hotpartition_threshold, this partition is a hot partition"); DSN_TAG_VARIABLE(hot_partition_threshold, FT_MUTABLE); DSN_DEFINE_validator(hot_partition_threshold, - [](int32_t threshold) -> bool { return threshold >= 0 }); + [](int32_t threshold) -> bool { return threshold >= 0; }); DSN_DEFINE_int32("pegasus.collector", occurrence_threshold, 3, "hot paritiotion occurrence times' threshold to send rpc to detect hotkey"); DSN_TAG_VARIABLE(occurrence_threshold, FT_MUTABLE); -DSN_DEFINE_validator(occurrence_threshold, [](int32_t threshold) -> bool { return threshold >= 0 }); +DSN_DEFINE_validator(occurrence_threshold, + [](int32_t threshold) -> bool { return threshold >= 0; }); void hotspot_partition_calculator::data_aggregate(const std::vector &partition_stats) {