-
Notifications
You must be signed in to change notification settings - Fork 833
Split ReadRing.GetAll() into two functions #3460
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
Signed-off-by: Marco Pracucci <[email protected]>
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 was just wondering about this the other day, thanks for splitting it! LGTM, with some nits.
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
@pstibrany Thanks for your review! I addressed your comments and should be ready for a second pass review 🙏 |
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
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!
What this PR does:
In the PR #3414 we're working to add zone-awareness support to
Ring.GetAll()
. The new logic (which triggers when zone-awareness replication is enabled) is not safe to apply in all contexts whereGetAll()
is used.The reason is that
GetAll()
is currently used for two very distinct purposes:The zone-awareness logic should apply to (2) but not to (1).
In this PR, I'm proposing to split
GetAll()
intoGetAllHealthy()
(to cover case 1) andGetReplicationSetForOperation()
(to cover case 2). The reason why I renamedGetAll()
intoGetReplicationSetForOperation()
is so that we can signal downstream projects about this change and let them take an informed decision whether should be used one or the other one.Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]