-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: tighten and de-fatal replicaGC checks
Now we return most failed checks as errors and report errors to sentry (but without crashing). `TestStoreRemoveReplicaDestroy` was updated with somewhat better coverage of these error conditions, which is now I also slightly rearranged the checks; it makes sense to me to check that the store doesn't have a different Replica, rather than using a potentially old Replica and failing the nextReplicaID check. old order new order - assert replica is inited - assert replica is inited - assert opts are compatible with each other - assert opts are compatible with each other - maybe return early - maybe return early - assert destroy status - assert destroy status - assert replica id < nextReplicaID ───┐ ┌─► - *assert same replica in store* - assert replica is inited (again) └──┼─► - *assert replica id < nextReplicaID* - set destroy status │ - set destroy status - assert same replica in store────────────┘ - remainder - remainder Closes #94813. Epic: None Release note: None
- Loading branch information
Showing
3 changed files
with
65 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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