-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
rework range level gossiping; remove Range.start() #884
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
} | ||
timestamp := r.rm.Clock().Now() | ||
|
||
// Check for or obtain the lease, if none active. | ||
if err := r.redirectOnOrAcquireLeaderLease(timestamp); err != nil { | ||
err := r.redirectOnOrAcquireLeaderLease(timestamp) | ||
if err != nil { | ||
switch e := err.(type) { | ||
// NotLeaderError means there is an active lease, leaseRejectedError | ||
// means we tried to get one but someone beat us to it. They're nothing |
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.
s/ They're nothing//
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.
done
LGTM |
- configs are now initially gossiped on store start, but also "heartbeat" periodically by the store for those ranges which contain them. this is necessary since leader crashes may in some scenarios prevent persisted data from being circulated via gossip. as before, configs are also gossiped upon obtaining (not extending!) a leader lease, and when an update to them is written. - removed range.start(), which is now obsolete. A range is now a single object free of attached goroutines or special cases to populate gossip upon instantiation. - disabled various tests and added TODOs with instructions on how to fix them.
tbg
added a commit
that referenced
this pull request
May 4, 2015
rework range level gossiping; remove Range.start()
LGTM |
kkaneda
added a commit
that referenced
this pull request
Jun 27, 2015
The code was changed by #884 so that gossip is published even when the replica is not a new lease holder.
This was referenced Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
but also "heartbeat" periodically by the store for those
ranges which contain them.
this is necessary since leader crashes may in some scenarios
prevent persisted data from being circulated via gossip.
configs are now also gossiped upon extending (previously
only on obtaining) a leader lease, and when an update to them is
written (as before).
A range is now a single object free of attached goroutines
or special cases to populate gossip upon instantiation.
on how to fix them.
there are some data races because we fill gossip very early (while some of its contents are being printed, I think). will take care of this before merging, but the rest should be ready for a good look.
fixes #872