-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hotkey): dynamic change some parameters in hotkey detection #679
Conversation
How about add validator for the configuration which is necessary to validate? |
56b475d
src/server/hotkey_collector.cpp
Outdated
@@ -33,12 +33,18 @@ DSN_DEFINE_uint32( | |||
hot_bucket_variance_threshold, | |||
7, | |||
"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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32 must be >= 0, I think it's useless to add a validator here.
@@ -41,17 +41,24 @@ DSN_DEFINE_bool("pegasus.collector", | |||
enable_detect_hotkey, | |||
false, | |||
"auto detect hot key in the hot paritition"); | |||
DSN_TAG_VARIABLE(enable_detect_hotkey, FT_MUTABLE); | |||
|
|||
DSN_DEFINE_int32("pegasus.collector", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSN_DEFINE_int32 -> DSN_DEFINE_uint32
|
||
DSN_DEFINE_int32("pegasus.collector", | ||
hot_partition_threshold, | ||
3, | ||
"threshold of hotspot partition value, if app.stat.hotspots >= " | ||
"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; }); | ||
|
||
DSN_DEFINE_int32("pegasus.collector", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSN_DEFINE_int32 -> DSN_DEFINE_uint32
5c1b2ca
to
0d5aa52
Compare
No description provided.