AdminMerge: make check for collocated replicas transactional#2431
AdminMerge: make check for collocated replicas transactional#2431bdarnell merged 2 commits intocockroachdb:masterfrom
Conversation
There was a problem hiding this comment.
AdminMerge takes any key in the left-hand side of the range, but the split key is in the right-hand side. This call was trying to merge ["g", "\xff\xff"] with its non-existent following range instead of merging the two ranges mentioned in the comment. Now that AdminMerge returns an error in this case instead of silently doing nothing, it detected this bug.
There was a problem hiding this comment.
Great, thanks for the detailed explanation.
There was a problem hiding this comment.
the comment for this test needs an update.
This lets us fix TestStoreRangeMergeNonConsecutive (which was misnamed) without relying on delicate operations like Store.RemoveReplica. Fixes cockroachdb#2363.
58636b2 to
68a26f4
Compare
storage/replica_command.go
Outdated
There was a problem hiding this comment.
desc1Key, can you rename this to match updatedDescKey or something like that to match updatedDesc?
There was a problem hiding this comment.
Renamed to "left" and "right".
|
LGTM with some minor renaming. |
AdminMerge: make check for collocated replicas transactional
This lets us fix TestStoreRangeMergeNonConsecutive (which was misnamed)
without relying on delicate operations like Store.RemoveReplica.
Fixes #2363.