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.
100401: raftlog: correctly decode empty commands r=erikgrinaker a=erikgrinaker When unquiescing a Raft group, an empty command is proposed to wake the Raft leader. During application, empty entries are considered noops, but only if they don't have a command ID. However, Raft entry decoding would preserve the command ID of an empty payload. `CheckForcedErr()` thus no longer considered this a noop, instead returning an error because the `ProposerLeaseSequence` of 0 was older than the current lease. Construction and processing of this error had a non-negligible cost when unquiescing a large number of ranges. This patch makes sure such empty commands are decoded as empty entries, without a command ID, and thus considered noops. Resolves cockroachdb#100400. Epic: none Release note: None Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
3 changed files
with
53 additions
and
19 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