Skip to content

kvserver: don't use ClearRange point deletes with estimated MVCC stats #74686

@erikgrinaker

Description

@erikgrinaker

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.

Metadata

Metadata

Assignees

Labels

A-kvAnything 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions