Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: in race build, assert HardState integrity
Motivated by cockroachdb#16749. Added an assertion that catches HardState clobbering. Now ``` make stressrace PKG=./pkg/storage/ TESTS=TestStoreRangeSplitRaceUninitializedRHS ``` fails immediately with ``` clobbered hard state: [Term: 8 != 9 Commit: 10 != 0] previously: raftpb.HardState{ Term: 0x9, Vote: 0x2, Commit: 0x0, XXX_unrecognized: nil, } overwritten with: raftpb.HardState{ Term: 0x8, Vote: 0x2, Commit: 0xa, XXX_unrecognized: nil, } ``` which is fixed in the next commit in this PR.
- Loading branch information