Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
111814: liveness: fix node count test to handle ambiguous errors r=AlexTalks a=AlexTalks When a node's liveness membership status is updated, it repeatedly attempts to perform the update using a `CPut`, with the original status passed in as the expectation to ensure proper state transitions in the face of multiple potential updates. When this condition fails, but the actual status turns out to already be in the desired state, the liveness update returns with no error, but reports the operation as a no-op via the returned `statusChanged` flag as false. In the case of ambiguous result errors where the write succeeded, followed by a subsequent retry, the retry may encounter the already-updated value, and report that the retry was a no-op. While this `statusChanged` flag is not needed for correctness, it is used for (best-effort) event logging and checked in tests, which do not account for this potential ambiguity. While it could be possible to propagate the past ambiguity to higher layers to deal with, given that this flag is not needed for correctness, this change instead fixes tests to account for the potential case, instead preferring to check the expected membership status itself. Part of: cockroachdb#111494 Release note: None Co-authored-by: Alex Sarkesian <[email protected]>
- Loading branch information