Skip to content
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

Merged
merged 5 commits into from
Jan 12, 2021

Conversation

Smityz
Copy link
Contributor

@Smityz Smityz commented Jan 11, 2021

No description provided.

foreverneverer
foreverneverer previously approved these changes Jan 11, 2021
levy5307
levy5307 previously approved these changes Jan 11, 2021
neverchanje
neverchanje previously approved these changes Jan 11, 2021
@hycdong
Copy link
Contributor

hycdong commented Jan 11, 2021

How about add validator for the configuration which is necessary to validate?

tangyanzhao added 2 commits January 11, 2021 14:49
@Smityz Smityz dismissed stale reviews from neverchanje, levy5307, and foreverneverer via 56b475d January 11, 2021 07:03
acelyc111
acelyc111 previously approved these changes Jan 12, 2021
levy5307
levy5307 previously approved these changes Jan 12, 2021
@@ -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,
Copy link
Contributor

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",
Copy link
Contributor

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",
Copy link
Contributor

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

@Smityz Smityz dismissed stale reviews from levy5307 and acelyc111 via 0d5aa52 January 12, 2021 04:12
@levy5307 levy5307 merged commit 2344660 into apache:master Jan 12, 2021
@neverchanje neverchanje mentioned this pull request Mar 1, 2021
acelyc111 pushed a commit that referenced this pull request Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants