Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: fix inability to update liveness in mixed version clusters
The encoding of `storage.Liveness` changed in cockroachdb#18910 which caused node liveness updates to fail in mixed version clusters due to failed conditional puts. Because the encoding changed, continued attempts to update the liveness would never succeed. Changed `Liveness.expiration` to use the `LegacyTimestamp` type. Audited the code and the only protos that are used as the expected value in conditional put operations are `storage.Liveness` and `roachpb.RangeDescriptor`. Extended TestBelowRaftProtos to verify the encoding of these protos does not change unexpectedly. Consistency checks were failing in mixed version clusters because of an explicit call to marshal an `hlc.Timestamp` in `Replica.sha512`. Fixes cockroachdb#18940
- Loading branch information