-
Notifications
You must be signed in to change notification settings - Fork 833
Wait for a stable ring at compactor startup #3484
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
Conversation
324c446
to
209182b
Compare
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.
LGTM, thanks. My comments are not blocking.
pkg/ring/util.go
Outdated
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'd suggest removing maxWaiting
and rely on context only. Client calling this can already setup context deadline, if needed. The code right now returns context.DeadlineExceeded
when maxWaiting
is reached, which client may confuse with its own context deadline.
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 thought the same, but using it from the caller perspective is more annoying, because it's not something you can do inline. You need to get a new context, defer the cancel(), call the WaitRingStability().
pkg/ring/util.go
Outdated
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.
Use ticker?
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.
It's more lines of code. Any benefit of using a ticker?
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.
Discussed offline. Will move to ticker.
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
209182b
to
5b70ebd
Compare
What this PR does:
This is like #2827 but for the compactor. The idea is to add the ability to wait for a stable ring at compactor startup. If this proposal is accepted, I will then work on the same for the store-gateway.
Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]