Skip to content
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

storage: RangeDescriptor incompatibility with previous versions #38471

Closed
danhhz opened this issue Jun 26, 2019 · 0 comments · Fixed by #38465
Closed

storage: RangeDescriptor incompatibility with previous versions #38471

danhhz opened this issue Jun 26, 2019 · 0 comments · Fixed by #38465
Assignees
Labels
A-kv-distribution Relating to rebalancing and leasing. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@danhhz
Copy link
Contributor

danhhz commented Jun 26, 2019

#38147 and #38004 both introduced an incompatibility with old versions of cockroach where RangeDescriptors could no longer be updated. This is because we were using CPut with a proto as the expected value, which is A Bad Idea (see #38302 for why). #38302 tried to fix this by CPut'ing bytes when updating RangeDescriptors. It fixed the new node reading RangeDescriptor written by an old node, but didn't fix an old node reading a RangeDescriptor written by a new node. This means we can't run mixed clusters with old versions of cockroach (splits, replica addition, replica movement, etc are broken).

This is blocking the 19.2.0-alpha.20190701 release

@danhhz danhhz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-kv-distribution Relating to rebalancing and leasing. labels Jun 26, 2019
craig bot pushed a commit that referenced this issue Jun 26, 2019
38465: roachpb: Change RangeDescriptor.StickyBit and ReplicaDescriptor.Type to nullable r=jeffrey-xiao a=jeffrey-xiao

On a mixed version cluster, only having #38302 does not guarantee backwards compatibility for non-nullable fields in RangeDescriptor. Suppose the replicas of a range are of mixed version and the current
leaseholder of the range is on newest version. If the leaseholder splits that range and writes to the non-nullable fields in RangeDescriptor and the leaseholder transfers to a node on an older version without #38302, then all CPuts would fail on that node.

We must guarantee that #38302 is on all nodes before making the fields in RangeDescriptor non-nullable.

Fixes #36983.
Fixes #38471.

Release note: None

Co-authored-by: Jeffrey Xiao <[email protected]>
craig bot pushed a commit that referenced this issue Jun 27, 2019
38465: roachpb: Change RangeDescriptor.StickyBit and ReplicaDescriptor.Type to nullable r=jeffrey-xiao a=jeffrey-xiao

On a mixed version cluster, only having #38302 does not guarantee backwards compatibility for non-nullable fields in RangeDescriptor. Suppose the replicas of a range are of mixed version and the current
leaseholder of the range is on newest version. If the leaseholder splits that range and writes to the non-nullable fields in RangeDescriptor and the leaseholder transfers to a node on an older version without #38302, then all CPuts would fail on that node.

We must guarantee that #38302 is on all nodes before making the fields in RangeDescriptor non-nullable.

Fixes #36983.
Fixes #38471.

Release note: None

Co-authored-by: Jeffrey Xiao <[email protected]>
@craig craig bot closed this as completed in #38465 Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-distribution Relating to rebalancing and leasing. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
2 participants