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

server: Added config parameter experimental-apply-warning-duration #12448

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

agargi
Copy link
Contributor

@agargi agargi commented Nov 4, 2020

server: Added config parameter apply-warning-duration

Refer: #10860

Copy link
Contributor

@jingyih jingyih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! My preference would be to introduce this new flag as an experimental flag in etcd v3.5. This is usually the case when a new flag is being added.

@agargi
Copy link
Contributor Author

agargi commented Nov 8, 2020

Thanks! My preference would be to introduce this new flag as an experimental flag in etcd v3.5. This is usually the case when a new flag is being added.

Converted this into an experimental flag and pushed changes. Build is however failing but failure does not seem to be related to the change. Is there a way I can re-trigger the build?

@agargi agargi changed the title server: Added config parameter apply-warning-duration server: Added config parameter experimental-apply-warning-duration Nov 8, 2020
Copy link
Contributor

@jingyih jingyih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added suggestion on making the flag description more precise. Otherwise LGTM. Thanks!

@@ -254,6 +254,7 @@ func newConfig() *config {
fs.IntVar(&cfg.ec.ExperimentalCompactionBatchLimit, "experimental-compaction-batch-limit", cfg.ec.ExperimentalCompactionBatchLimit, "Sets the maximum revisions deleted in each compaction batch.")
fs.DurationVar(&cfg.ec.ExperimentalWatchProgressNotifyInterval, "experimental-watch-progress-notify-interval", cfg.ec.ExperimentalWatchProgressNotifyInterval, "Duration of periodic watch progress notifications.")
fs.DurationVar(&cfg.ec.ExperimentalDowngradeCheckTime, "experimental-downgrade-check-time", cfg.ec.ExperimentalDowngradeCheckTime, "Duration of time between two downgrade status check.")
fs.DurationVar(&cfg.ec.WarnApplyDuration, "experimental-apply-warning-duration", cfg.ec.WarnApplyDuration, "Time duration after which a warning is generated if request takes more time.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Time duration after which a warning is generated if applying request takes more time."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 @jingyih Also, couple nits, we should keep the naming consistent i.e. 1) Use Experimental prefix for the parameter name similar to other experimental ones. e.g. ExperimentalDowngradeCheckTime 2) Considering the name is not long, good idea to use WarningApplyDuration 3) Keeping consistent with naming, suggest to use experimental-warning-apply-duration instead of experimental-apply-warning-duration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spzala @jingyih Changes recommended done & modified code committed

@@ -178,6 +179,10 @@ type Config struct {
MaxTxnOps uint `json:"max-txn-ops"`
MaxRequestBytes uint `json:"max-request-bytes"`

// WarnApplyDuration is time duration after which a warning is generated if request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*if applying request takes more time than this value.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but few nits. Thanks @agargi

@@ -254,6 +254,7 @@ func newConfig() *config {
fs.IntVar(&cfg.ec.ExperimentalCompactionBatchLimit, "experimental-compaction-batch-limit", cfg.ec.ExperimentalCompactionBatchLimit, "Sets the maximum revisions deleted in each compaction batch.")
fs.DurationVar(&cfg.ec.ExperimentalWatchProgressNotifyInterval, "experimental-watch-progress-notify-interval", cfg.ec.ExperimentalWatchProgressNotifyInterval, "Duration of periodic watch progress notifications.")
fs.DurationVar(&cfg.ec.ExperimentalDowngradeCheckTime, "experimental-downgrade-check-time", cfg.ec.ExperimentalDowngradeCheckTime, "Duration of time between two downgrade status check.")
fs.DurationVar(&cfg.ec.WarnApplyDuration, "experimental-apply-warning-duration", cfg.ec.WarnApplyDuration, "Time duration after which a warning is generated if request takes more time.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 @jingyih Also, couple nits, we should keep the naming consistent i.e. 1) Use Experimental prefix for the parameter name similar to other experimental ones. e.g. ExperimentalDowngradeCheckTime 2) Considering the name is not long, good idea to use WarningApplyDuration 3) Keeping consistent with naming, suggest to use experimental-warning-apply-duration instead of experimental-apply-warning-duration

@@ -214,6 +214,8 @@ Experimental feature:
Skip verification of SAN field in client certificate for peer connections.
--experimental-watch-progress-notify-interval '10m'
Duration of periodical watch progress notification.
--experimental-apply-warning-duration '100ms'
Warning is generated if certain requests take more than this duration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 @jingyih Also, certain requests is confusing here. I guess we can simply say Warning is generated if requests take more time than this duration.?

@agargi agargi force-pushed the introduce_config_parameter branch 2 times, most recently from 09d7bd9 to b00069f Compare November 14, 2020 21:35
@@ -178,6 +179,10 @@ type Config struct {
MaxTxnOps uint `json:"max-txn-ops"`
MaxRequestBytes uint `json:"max-request-bytes"`

// This is the time duration after which a warning is generated if applying request
// takes more time than this value.
ExperimentalWarningApplyDuration time.Duration `json:"experimental-warning-apply-duration"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: could you move this flag to the code block around line 290? It looks like all the experimental flags are grouped there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jingyih Done

@@ -178,6 +179,10 @@ type Config struct {
MaxTxnOps uint `json:"max-txn-ops"`
MaxRequestBytes uint `json:"max-request-bytes"`

// This is the time duration after which a warning is generated if applying request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By convention, the comment should start with the flag name, i.e., s/This/ExperimentalWarningApplyDuration. Otherwise the goword checking will complain: https://travis-ci.com/github/etcd-io/etcd/jobs/440054426#L442

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jingyih Done

@spzala
Copy link
Member

spzala commented Nov 18, 2020

lgtm @agargi thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants