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: fix format major version ratcheting and parsing #2691

Merged
merged 5 commits into from
Jul 1, 2023

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Jun 28, 2023

Fix a few bugs in the metamorphic tests' use of format major versions. These bugs were hiding an issue with the new obsolete-bit in the sstable format, and so I've temporarily disabled that codepath.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jbowens jbowens force-pushed the fix-deletesized-meta branch from d568fb2 to 8956c1a Compare June 30, 2023 21:46
jbowens added 4 commits June 30, 2023 17:48
Fix three bugs in the metamorphic tests' use of format major versions.

First, during op generation, the code failed to add the minimum format major
version back to the randomly generated value. This prevented format major
versions from being ratcheted up sufficiently high.

Second, during options generation, randomized options would only use format
major verisons as recent as FormatNewest (which excluded the two experimental
format major versions which have not yet been stabilized).

Third, parsing format major version strings could fail for some values because
ParseUint interpreted the leading `0` as indicating an octal value because the
base argument was unspecified.
Previously DELSIZED keys were written with value sizes over a much larger
magnitude than the actual values persisted. This made it very unlikely a
DELSIZED key ever was the same size as the value it deleted.
Add a standard metamorphic tests options configuration that uses the latest
format major version from the start of the test.
Setting the new isObsolete bit can cause missing keys. See cockroachdb#2705 for tracking
fixing.
@jbowens jbowens force-pushed the fix-deletesized-meta branch from 8956c1a to 1bab415 Compare July 1, 2023 01:56
Support exercising the new ExperimentalFormatVirtualSSTables format major
version now.
@jbowens jbowens marked this pull request as ready for review July 1, 2023 01:58
@jbowens jbowens requested review from a team and RaduBerinde July 1, 2023 02:00
@jbowens jbowens changed the title metamorphic: fix metamorphic format major version ratcheting and parsing metamorphic: fix format major version ratcheting and parsing Jul 1, 2023
Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 3 files at r1, 3 of 3 files at r2, 3 of 3 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

@jbowens
Copy link
Collaborator Author

jbowens commented Jul 1, 2023

TFTR!

@jbowens jbowens merged commit 609ae80 into cockroachdb:master Jul 1, 2023
@jbowens jbowens deleted the fix-deletesized-meta branch July 1, 2023 13:59
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