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

metamorphic: skip non-suffixed keys on time-bound iterators #4273

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Jan 21, 2025

The metamorphic tests sometimes generates iterators with block-property filters constraining the set of MVCC timestamps that should be observed. Previously keys that were not suffixed were guaranteed to always be surfaced. The testkeys block-property collector would map an unsuffixed key to the maximal interval, ensuring any block containing an unsuffixed key would be visited by all time-bound iterators.

The cockroachdb block-property collector does not give non-MVCC keys the same treatment. Instead, it simply ignores non-timestamped keys for the purpose of calculating block-property collectors. This results in non-deterministic presence of non-MVCC keys in a time-bound iterators iteration. With the introduction of cockroach kvs in the metamorphic test, we'll need consistent, deterministic behavior. Skipping non-MVCC keys on time-bound iterators ensures the iterator observes the same keys regardless of the behavior of the underlying block property collector.

The metamorphic tests sometimes generates iterators with block-property filters
constraining the set of MVCC timestamps that should be observed. Previously
keys that were not suffixed were guaranteed to always be surfaced. The testkeys
block-property collector would map an unsuffixed key to the maximal interval,
ensuring any block containing an unsuffixed key would be visited by all
time-bound iterators.

The cockroachdb block-property collector does not give non-MVCC keys the same
treatment. Instead, it simply ignores non-timestamped keys for the purpose of
calculating block-property collectors. This results in non-deterministic
presence of non-MVCC keys in a time-bound iterators iteration. With the
introduction of cockroach kvs in the metamorphic test, we'll need consistent,
deterministic behavior. Skipping non-MVCC keys on time-bound iterators ensures
the iterator observes the same keys regardless of the behavior of the
underlying block property collector.
@jbowens jbowens requested a review from a team as a code owner January 21, 2025 17:42
@jbowens jbowens requested a review from RaduBerinde January 21, 2025 17:42
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jbowens
Copy link
Collaborator Author

jbowens commented Jan 21, 2025

TFTR!

@jbowens jbowens merged commit 02e24de into cockroachdb:master Jan 21, 2025
23 checks passed
@jbowens jbowens deleted the metamorphic-skip branch January 21, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants