-
Notifications
You must be signed in to change notification settings - Fork 880
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
Add dynamic config for namespace refresh interval #2766
Conversation
There's a manual force refresh call, although it's not exposed as a public api. Maybe we should expose that and call it when appropriate? |
No. It would be hard to call into refresh because each service instance has its own cache. |
// Put timer events on our channel so we can select on just one below. | ||
go func() { | ||
for range timer.C { | ||
timer := time.NewTicker(r.refreshInterval()) |
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.
Nit: how about use a new timer and reset it after it fires
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.
Do you mean instead of doing
timer.Stop()
timer = time.NewTicker(r.refreshInterval())
I do timer.Reset?
@@ -196,7 +197,7 @@ func (e *executableImpl) HandleErr(err error) (retErr error) { | |||
// TODO remove this error check special case |
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.
Could we remove this check?
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 don't know :)
@yycptt Should I remove it or do you want to do it later in your PR?
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 will do it later after merging active & standby queue processor.
@@ -196,7 +197,7 @@ func (e *executableImpl) HandleErr(err error) (retErr error) { | |||
// TODO remove this error check special case |
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 will do it later after merging active & standby queue processor.
What changed?
Add dynamic config for namespace refresh interval
Why?
To reduce wait time for namespace promotion and failover.
How did you test it?
Local tests.
Potential risks
Is hotfix candidate?