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: continue sending ReplicaState.TxnSpanGCThreshold to 19.1 nodes #39003

Merged
merged 1 commit into from
Jul 20, 2019

Conversation

nvanbenschoten
Copy link
Member

Fixes #38996.

We saw in the referenced issue that a 19.1 node crashed after being sent
a snapshot with a TxnSpanGCThresholdKey but without the corresponding
value in SnapshotRequest_Header.ReplicaState.TxnSpanGCThreshold. This
commit avoids this assertion failure by continuing to send this field
in the snapshot header, even though it is no longer maintained.

19.2 nodes will ignore the field during entry application and during
snapshot ingestion, so the change has no effect on them. However,
we can rest assured that the same assertion would fire if we messed
this up on 19.2 nodes.

Release note: None

@nvanbenschoten nvanbenschoten requested review from ajwerner and a team July 19, 2019 20:24
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Fixes cockroachdb#38996.

We saw in the referenced issue that a 19.1 node crashed after being sent
a snapshot with a TxnSpanGCThresholdKey but without the corresponding
value in SnapshotRequest_Header.ReplicaState.TxnSpanGCThreshold. This
commit avoids this assertion failure by continuing to send this field
in the snapshot header, even though it is no longer maintained.

19.2 nodes will ignore the field during entry application and during
snapshot ingestion, so the change has no effect on them. However,
we can rest assured that the same assertion would fire if we messed
this up on 19.2 nodes.

Release note: None
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/fix38996 branch from b911b74 to 0ff7569 Compare July 19, 2019 20:40
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 5 of 5 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@nvanbenschoten
Copy link
Member Author

bors r=ajwerner

craig bot pushed a commit that referenced this pull request Jul 20, 2019
39003: storage: continue sending ReplicaState.TxnSpanGCThreshold to 19.1 nodes r=ajwerner a=nvanbenschoten

Fixes #38996.

We saw in the referenced issue that a 19.1 node crashed after being sent
a snapshot with a TxnSpanGCThresholdKey but without the corresponding
value in SnapshotRequest_Header.ReplicaState.TxnSpanGCThreshold. This
commit avoids this assertion failure by continuing to send this field
in the snapshot header, even though it is no longer maintained.

19.2 nodes will ignore the field during entry application and during
snapshot ingestion, so the change has no effect on them. However,
we can rest assured that the same assertion would fire if we messed
this up on 19.2 nodes.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jul 20, 2019

Build succeeded

@craig craig bot merged commit 0ff7569 into cockroachdb:master Jul 20, 2019
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/fix38996 branch July 21, 2019 03:00
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this pull request Jul 29, 2019
…missing

Fixes cockroachdb#39138.

This was missed in cockroachdb#39003. v19.1 nodes populate their ReplicaState with an
empty TxnSpanGCThreshold when the key is missing, not a nil TxnSpanGCThreshold.
See https://github.com/cockroachdb/cockroach/blob/b8554ec29fd1620c0e6af9544d678db57d251f4c/pkg/storage/stateloader/stateloader.go#L474.
We need to do the same to avoid an assertion failure after a snapshot.

Release note: None
craig bot pushed a commit that referenced this pull request Jul 29, 2019
39145: storage: add empty DeprecatedTxnSpanGCThreshold to snapshot when key missing r=nvanbenschoten a=nvanbenschoten

Fixes #39138.

This was missed in #39003. v19.1 nodes populate their ReplicaState with an empty TxnSpanGCThreshold when the key is missing, not a nil TxnSpanGCThreshold. See https://github.com/cockroachdb/cockroach/blob/b8554ec29fd1620c0e6af9544d678db57d251f4c/pkg/storage/stateloader/stateloader.go#L474-L482

We need to do the same to avoid an assertion failure after a snapshot.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
nvanbenschoten added a commit that referenced this pull request Jul 30, 2019
…missing

Fixes #39138.

This was missed in #39003. v19.1 nodes populate their ReplicaState with an
empty TxnSpanGCThreshold when the key is missing, not a nil TxnSpanGCThreshold.
See https://github.com/cockroachdb/cockroach/blob/b8554ec29fd1620c0e6af9544d678db57d251f4c/pkg/storage/stateloader/stateloader.go#L474.
We need to do the same to avoid an assertion failure after a snapshot.

Release note: None
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this pull request Dec 19, 2019
Completes the migration started in cockroachdb#38817 and partially preserved in cockroachdb#39003.
This needed to wait for v20.1.

Release note: None
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this pull request Dec 20, 2019
Completes the migration started in cockroachdb#38817 and partially preserved in cockroachdb#39003.
This needed to wait for v20.1.

Release note: None
craig bot pushed a commit that referenced this pull request Dec 20, 2019
43328: storage: delete ReplicaState.DeprecatedTxnSpanGCThreshold r=nvanbenschoten a=nvanbenschoten

Completes the migration started in #38817 and partially preserved in #39003. This needed to wait for v20.1.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: version/mixed/nodes=5 failed
3 participants