Open petermattis opened 4 years ago
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
I'm pretty sure this issue remains valid. Someone from @cockroachdb/storage should triage and decide if this optimization is worthwhile.
Spun out of #53192.
MVCCDeleteRange
is implemented viaMVCCScan
followed byMVCCDelete
for each of the returned keys. This is inefficient for three reasons. First, we're usingMVCCScan
which returns a[]roachpb.KeyValue
. We could instead useMVCCScanToBytes
. Second, we're buffering the values of the keys to delete, but we do not actually need the values. This could be alleviated by adding a newMVCCScanOption
that indicates only keys are needed. Third, we're buffering all of the keys to be deleted. This last problem is the hardest to deal with, but with appropriatepebbleMVCCScanner
hooks we could imagine an integrated scan&delete rather than the separate steps. We'd still need to buffer the deleted keys, but the would be buffered only once in the batch.Jira issue: CRDB-3876