-
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
storage: release preemptive snapshot after remote apply #10491
storage: release preemptive snapshot after remote apply #10491
Conversation
8fdadf0
to
1710cfd
Compare
Perhaps you could simulate exactly the problem in #10409? We'll need a know to inject a raft log truncation after the first range on the second node receives its pre-emptive snapshot and before the ensuing conf change. Reviewed 1 of 1 files at r1. Comments from Reviewable |
1710cfd
to
54e28cc
Compare
54e28cc
to
287e4fe
Compare
Added a test that directly tests that the preemptive snapshot is released. The test fails on master and passes on this PR. |
Previously we were releasing the snapshot (i.e. calling `Replica.CloseOutSnap()`) when the ChangeReplicas operation completed. Now we release the snapshot as soon as the remote node has applied it. This is important to allow other ranges to make progress which might be required for the current ChangeReplicas operation to complete. Fixes cockroachdb#10483 Fixes cockroachdb#10306 See cockroachdb#10409
287e4fe
to
efa4624
Compare
I think we should keep #10482; the discrepancy between the Commit index and the current membership is a concern even when it doesn't lead to snapshots getting stuck. Review status: 1 of 2 files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
Clarify the doc. Fixes cockroachdb#10491
Previously we were releasing the snapshot (i.e. calling
Replica.CloseOutSnap()
) when the ChangeReplicas operationcompleted. Now we release the snapshot as soon as the remote node has
applied it. This is important to allow other ranges to make progress
which might be required for the current ChangeReplicas operation to
complete.
Fixes #10483
Fixes #10306
See #10409
This change is