Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tangyanzhao committed Jan 11, 2021
1 parent f5d1a3b commit 56b475d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/server/hotkey_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/server/hotspot_partition_calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<row_data> &partition_stats)
{
Expand Down

0 comments on commit 56b475d

Please sign in to comment.