-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: don't use ClearRange point deletes with estimated MVCC stats #74686
Copy link
Copy link
Closed
Labels
A-kvAnything in KV that doesn't belong in a more specific category.Anything in KV that doesn't belong in a more specific category.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
ClearRange avoids dropping a Pebble range tombstone if the amount of data that's deleted is small (<=512 KB), instead dropping point deletions. It uses MVCC statistics to determine this. However, when clearing an entire range, it will rely on the existing range MVCC stats rather than computing them.
These range statistics can be highly inaccurate -- in some cases so inaccurate that they even become negative. This in turn can cause ClearRange to submit a huge write batch, which gets rejected by Raft with command too large.
We should check whether the stats are accurate via ContainsEstimates before taking the point deletion path.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kvAnything in KV that doesn't belong in a more specific category.Anything in KV that doesn't belong in a more specific category.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.