Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
erikgrinaker opened this issue Jan 11, 2022 · 0 comments · Fixed by #74674
Closed

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

erikgrinaker opened this issue Jan 11, 2022 · 0 comments · Fixed by #74674
Assignees
Labels
A-kv Anything in KV that doesn't belong in a more specific category. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@erikgrinaker
Copy link
Contributor

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.

@erikgrinaker erikgrinaker added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-kv Anything in KV that doesn't belong in a more specific category. T-kv-replication labels Jan 11, 2022
@erikgrinaker erikgrinaker self-assigned this Jan 11, 2022
@craig craig bot closed this as completed in e3cbcf9 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv Anything in KV that doesn't belong in a more specific category. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant