transfer raft leadership to range leadership#5973
Merged
bdarnell merged 1 commit intocockroachdb:masterfrom Apr 12, 2016
Merged
transfer raft leadership to range leadership#5973bdarnell merged 1 commit intocockroachdb:masterfrom
bdarnell merged 1 commit intocockroachdb:masterfrom
Conversation
storage/client_raft_test.go
Outdated
| const numStores = 3 | ||
| mtc := startMultiTestContext(t, numStores) | ||
| defer mtc.Stop() | ||
| // Setup replication of ramge 1 on store 0 to stores 1 and 2. |
storage/client_raft_test.go
Outdated
| // Force the read command request a new lease. | ||
| clock := mtc.clocks[0] | ||
| header := roachpb.Header{} | ||
| header.Timestamp = clock.Update(clock.Now().Add(int64(storage.DefaultLeaderLeaseDuration), 0)) |
Contributor
There was a problem hiding this comment.
Use mtc.expireLeaderLeases() instead of adding the lease duration manually. Or is there some reason this is acting on clocks[0] instead of either mtc.manualClock or the clock corresponding to the store you target in the next line?
Contributor
|
LGTM |
…ated on the same store
1f22bbf to
ab90a69
Compare
Contributor
Author
|
updated as per comments. And removed raftStatusLocked. PTAL. |
Contributor
|
LGTM |
This file contains hidden or 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
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.
transfer raft leadership to range leadership if these two are not located on the same store, based on raft transfer-leadership etcd-io/etcd#4916. Use the up-to-date etcd commit which fix the spell error.
This change is