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

ingest: Add invariant-gated checks for accurate use of virtual sstable bounds #2593

Closed
itsbilal opened this issue Jun 5, 2023 · 2 comments · Fixed by #2616
Closed

ingest: Add invariant-gated checks for accurate use of virtual sstable bounds #2593

itsbilal opened this issue Jun 5, 2023 · 2 comments · Fixed by #2616

Comments

@itsbilal
Copy link
Member

itsbilal commented Jun 5, 2023

When #2538 merges, we will be synthesizing file bounds for virtual sstables that got keys masked through an Excise. And when #2582 merges, we'll be doing the same for sstables split by virtualizations We should add invariants.Enabled-gated checks to ensure that iterators created on top of virtual sstables do not return excised/masked keys, and that every key returned is within {Smallest,Largest}{PointKey,RangeKey}. We should also confirm if the bounds were calculated correctly to begin with.

After #2616 is complete, this issue only refers to verifying the tight calculation of sstable bounds, i.e. that there is a user key at each of the Smallest, Largest bounds. This check can happen in fileManifest.ValidateVirtual, however it would require creating iterators and is hence best to be invariants-gated as well.

@itsbilal itsbilal changed the title ingest: Add invariant-gated checks for accurate calculation of virtual sstable bounds ingest: Add invariant-gated checks for accurate use of virtual sstable bounds Jun 5, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 8, 2023
This pr adds bounds checking (global and block) for singleLevelIterator
when returning a value.

Fixes: cockroachdb#2593 Release note: None
raggar added a commit to raggar/pebble that referenced this issue Jun 9, 2023
This pr adds bounds checking (global and block) for singleLevelIterator
when returning a value.

Fixes: cockroachdb#2593 Release note: None
raggar added a commit to raggar/pebble that referenced this issue Jun 9, 2023
This pr adds bounds checking (global and block) for singleLevelIterator
when returning a value.

Fixes: cockroachdb#2593 Release note: None
raggar added a commit to raggar/pebble that referenced this issue Jun 12, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 14, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 14, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 15, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 15, 2023
raggar added a commit to raggar/pebble that referenced this issue Jun 15, 2023
raggar added a commit that referenced this issue Jun 15, 2023
…or when returning a value.

Fixes: #2593
Release note: None
@itsbilal
Copy link
Member Author

Reopening this issue to refer to just the tight calculation of bounds; there is one user key right at the Smallest/Largest bounds. We can confirm this in ValidateVirtual

@itsbilal itsbilal reopened this Jun 15, 2023
raggar added a commit to raggar/pebble that referenced this issue Jul 19, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 19, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 19, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 21, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 27, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 27, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 28, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Jul 28, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 1, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit to raggar/pebble that referenced this issue Aug 3, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: cockroachdb#2593
raggar added a commit that referenced this issue Aug 3, 2023
Added a check inside of `FileMetadata.ValidateVirtual()` to ensure that
the keys returned from a virtual sstable are within the bounds of the
Smallest and Largest metadata keys.

Informs: #2593
@raggar
Copy link
Contributor

raggar commented Aug 14, 2023

Fixed with #2698

@raggar raggar closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants