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

storage: use ClearMVCCRange when GC-ing multiple versions under range tombstones #84560

Closed
aliher1911 opened this issue Jul 18, 2022 · 3 comments · Fixed by #90830
Closed

storage: use ClearMVCCRange when GC-ing multiple versions under range tombstones #84560

aliher1911 opened this issue Jul 18, 2022 · 3 comments · Fixed by #90830
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@aliher1911
Copy link
Contributor

aliher1911 commented Jul 18, 2022

When the whole range content is removed during GC we would issue point deletes for every value found. This is wasteful as we may use ClearMVCCRange and related operations when doing so.

To do this, we should change GC to issue new types RangeDeletion requests that would put pebble range tombstones instead of individual deletes.

Note that new request field or request type is needed to ensure we could put proper latches as it would be possible to remove newer data. And this wouldn't not be compatible with latchless GC, but that is fine as ranges subject to complete deletion are unused and are not supposed to get recent writes.

Jira issue: CRDB-17736

Epic CRDB-20465

@aliher1911 aliher1911 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jul 18, 2022
@aliher1911 aliher1911 changed the title Use ClearMVCCRange when GC-ing multiple versions under e Use ClearMVCCRange when GC-ing multiple versions under range tombstones. Jul 18, 2022
@aliher1911 aliher1911 self-assigned this Jul 18, 2022
@aliher1911 aliher1911 added the A-kv-replication Relating to Raft, consensus, and coordination. label Jul 18, 2022
@blathers-crl
Copy link

blathers-crl bot commented Jul 18, 2022

cc @cockroachdb/replication

@erikgrinaker erikgrinaker changed the title Use ClearMVCCRange when GC-ing multiple versions under range tombstones. storage: use ClearMVCCRange when GC-ing multiple versions under range tombstones Jul 18, 2022
@erikgrinaker
Copy link
Contributor

Note that new request field or request type is needed to ensure we could put proper latches as it would be possible to remove newer data.

Don't we already take out a write latch when GCing MVCC range tombstones? Do we need anything more than that?

@blathers-crl
Copy link

blathers-crl bot commented Jul 18, 2022

cc @cockroachdb/replication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
2 participants