forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: correctly handle empty HardState during Raft Snapshot
Fixes cockroachdb#24854. Before this change, we were incorrectly handling cases where a non-empty Raft Snapshot included an empty HardState. Luckily, this case doesn't seem to be possible so we got lucky before and didn't introduce a bug. Still, we were playing with fire. This change adds an assertion that the HardState is never empty in these cases so that we can eliminate the incorrect handling for this case and restrict our logic. Release note: None
- Loading branch information
1 parent
6e04f50
commit f8b374f
Showing
1 changed file
with
12 additions
and
17 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