-
Notifications
You must be signed in to change notification settings - Fork 96
Hack -> Config: add options to disable smart retry #281
Conversation
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.
I really wish we could make the default to be "smart-retry" disabled. And if we go that route we should rename the flag to "FlagEnableSmartRetry", etc.
The only trouble is for existing CGs, we will need to set the flag to 'true', because the behaviour is that if the owner-email does not have "+smartRetryDisable", then it is enabled! Is that doable?
tools/common/lib.go
Outdated
if disableNackThrottling == "true" { | ||
|
||
disableNackThrottling := c.Bool(common.FlagDisableNackThrottling) | ||
if disableNackThrottling == true { |
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.
you could probably simply do:
if c.Bool(common.FlagDisableNackThrottling {
...
instead of assigning it to a separate variable just for checking, etc.
tools/common/lib.go
Outdated
options[common.FlagDisableNackThrottling] = "true" | ||
} | ||
|
||
disableSmartRetry := c.Bool(common.FlagDisableSmartRetry) | ||
if disableSmartRetry == true { |
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.
same as above.
tools/common/lib.go
Outdated
if c.Bool(common.FlagDisableSmartRetry) == true { | ||
disableSmartRetry = "true" | ||
} | ||
|
||
options = make(map[string]string) | ||
options[common.FlagDisableNackThrottling] = disableNackThrottling |
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.
couldn't you set this with one if-check?
if c.Bool(common.FlagDisableNackThrottling) {
options[common.FlagDisableNackThrottling] = "true"
}
etc
No description provided.