-
Notifications
You must be signed in to change notification settings - Fork 801
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
Notify named subscribers for membership changes #5823
Notify named subscribers for membership changes #5823
Conversation
Pull Request Test Coverage Report for Build 018ebfa2-6b0a-49b7-84c6-36513803f096Details
💛 - Coveralls |
Codecov Report
Additional details and impacted files
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
blocking until core issues are cleared up
0a3c5e5
to
e37b8b1
Compare
e37b8b1
to
c2dceb7
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.
- Q on a surprising change (just not sure how the changes lead to it, if there's a cause/effect I'm missing then it's totally fine and it looks correct to me)
- new test is rather highly racy and not reliable
Non-test-code changes look correct though 👍 I'll double check that next time, but I didn't see any issues in this read through.
626d83f
to
d15c029
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.
Yea, looks correct and I also can't get any test failures by stressing it*. Will merge as soon as the merge-and-retest finishes 👍
It'd be nice to shift all this to the mock clock so we can reduce some sleeps / actually ensure that only the test-triggered refresh runs (and not the ticker, though that'd take absurd machine load to hit), but that's well outside the scope of this PR.
* unless it runs too long / -count 1000
but that appears to be due to not shutting down hashrings in any of these tests.
What changed?
Notify "named" membership change subscribers
Why?
There are two levels of membership change notification mechanisms. One is per-service (frontend, history, etc), another one is for services to use in their internal components (like shard controller in history service).
For service-level subscribers, there was a missing piece of code to send notification on registered channel. As this is a bug, automatic 10s interval refresh helped to mitigate this bug. Now service-level subscribers will be informed immediately.
How did you test it?
Added unit test to check if notifications are sent when receiving message from "peer provider" (ringpop for example)
Potential risks
Release notes
Documentation Changes