-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: use
ClearRawRange
to truncate very large Raft logs
Raft log truncation was done using point deletes in a single Pebble batch. If the number of entries to truncate was very large, this could result in overflowing the Pebble batch, causing the node to panic. This has been seen to happen e.g. when the snapshot rate was set very low, effectively stalling snapshot transfers which in turn held up log truncations for extended periods of time. This patch uses a Pebble range tombstone if the number of entries to truncate is very large (>100k). In most common cases, point deletes are still used, to avoid writing too many range tombstones to Pebble. Release note (bug fix): Fixed a bug which could cause nodes to crash when truncating abnormally large Raft logs.
- Loading branch information
1 parent
d471ca8
commit 431212c
Showing
6 changed files
with
138 additions
and
36 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
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