-
Notifications
You must be signed in to change notification settings - Fork 476
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
internal/metamorphic: test block property filters #1725
Comments
Since this is a source of nondeterminism, this would require some interstitial iterator that skips over keys that match the block property's filtering condition but aren't eliminated by the block-property filter itself. |
Range deletions are an obstacle here and to #1713. The following assumes reverse direction, but the problem exists in the forward direction too. Suppose you have a file The
Another (daunting) thought is to refactor the way this mergingIter<>levelIter range deletion interaction works more generally by using the interleaving iterator to keep the table's point iterator and the range deletion iterator moving together within the levelIter. I think this would require an extension to the interleaving iterator to allow interleaving of span end keys too. |
This is indeed tricky. I think it is worth explicitly articulating what we are trying to do here with block property filters: block property filters were completely non-deterministic in that they could (a) expose points that should have been filtered, (b) expose points that have already been deleted. The goal here is to eliminate (b) so that the false positives in (a) can be removed simply by applying the filter again. Let's call this truthful-bpf.
Now coming back to this pausing problem in levelIter. I had to refresh my memory by reading the code, so I am writing down a summary of my understanding. All the pausing we do is to make sure rangedels continue to be alive until they are needed. Our current pausing is:
Our problem with truthful-bpf iteration resembles SeekPrefixGE but has some complications:
These are basically a terse restatement of what you outlined. Solution outline:
We can fix this no-gap problem by explicitly introducing a isIgnorableSyntheticIterFileBoundsKey bool that is visible to mergingIter and have mergingIter ignore such keys regardless of the type. We would use it for both SeekPrefixGE and the 2 case above and simply use the smallest and largest keys with this bool set, instead of doing tricks with InternalKeyKindRangeDelete. |
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Thanks @sumeerbhola, I implemented the bool-signalling approach in #1737. |
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix cockroachdb#1725.
Add test coverage for block-property filters to the metamorphic tests. Division of keys into blocks are nondeterministic, so this introduces nondeterminism into Iterator behavior. To account for this, the metamorphic test's iterator wrapper is adjusted to skip any keys that are eligible for filtering. Fix #1725.
The block-property filter codepaths don't get coverage in the metamorphic tests. Now that the metamorphic tests use keys with suffixes, we could add a block property collector and filter that mirrors the behavior of CockroachDB's time-bound iteration.
The text was updated successfully, but these errors were encountered: