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

db: refrain from loading L6 ingested sstable range deletions #3513

Open
jbowens opened this issue Apr 13, 2024 · 0 comments
Open

db: refrain from loading L6 ingested sstable range deletions #3513

jbowens opened this issue Apr 13, 2024 · 0 comments
Assignees
Projects

Comments

@jbowens
Copy link
Collaborator

jbowens commented Apr 13, 2024

A shower thought:

All keys within an ingested sstable receive the same sequence number. This ensures that a range deletion in an ingested sstable does not delete any point keys within the same sstable. When a table containing range deletions is ingested into L6, those range deletions are necessarily ineffectual. There are no keys lower in the LSM for them to delete. When the table cache is opening iterators into an sstable, it knows the level of the sstable (from the perspective of the caller's manifest.Version). When the table is an ingested sstable and the caller indicates the sstable is in L6, we can return a nil rangedel iterator.

In the context of CockroachDB, this will mean that the range deletions contained within snapshot-ingested sstables containing user MVCC data will never be read once the ingestion has completed, because these sstables are installed directly into L6 after excise.

This avoids unnecessarily:

  • performing I/O
  • holding these blocks in the block cache
  • CPU overhead of checking applicability of range deletions during iteration
@jbowens jbowens added this to Incoming in Storage via automation Apr 13, 2024
@nicktrav nicktrav moved this from Incoming to Next in Storage Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Storage
  
Next
Development

No branches or pull requests

2 participants