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: Add FormatMajorVersion for virtual sstables #2600

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

itsbilal
Copy link
Member

@itsbilal itsbilal commented Jun 6, 2023

This change adds a specific FormatMajorVersion specifically for the virtual sstable work, as the changes in #2484 are not backward compatible. There's a guard in version application that will error out if we create a backing table without having an appropriate FMV.

Fixes #2557.

@itsbilal itsbilal requested review from jbowens and a team June 6, 2023 14:56
@itsbilal itsbilal self-assigned this Jun 6, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

We only check the version against FormatVirtualSSTables in one place, and it's an after-the-fact assertion. Shouldn't we check for it in the code path that creates virtual SSTs?

Reviewable status: 0 of 8 files reviewed, 2 unresolved discussions (waiting on @itsbilal and @jbowens)


format_major_version.go line 164 at r1 (raw file):

	// FormatVirtualSSTables is a format major version that adds support for
	// virtual sstables that can reference a sub-range of keys in an underlying
	// physical sstables. This information is persisted through new,

[nit] sstable


format_major_version.go line 166 at r1 (raw file):

	// physical sstables. This information is persisted through new,
	// backward-incompatible fields in the Manifest, and therefore requires
	// an FMV.

[nit] "FMV" is not used anywhere in these comments, I'd expand to "format major version"

Copy link
Collaborator

@jbowens jbowens 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 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @itsbilal)


format_major_version.go line 167 at r1 (raw file):

	// backward-incompatible fields in the Manifest, and therefore requires
	// an FMV.
	FormatVirtualSSTables

nit: can we prefix with "Experimental" too for now?

This change adds a specific FormatMajorVersion specifically
for the virtual sstable work, as the changes in cockroachdb#2484 are
not backward compatible. There's a guard in version application
that will error out if we create a backing table without
having an appropriate FMV.

Fixes cockroachdb#2557.
@itsbilal itsbilal force-pushed the fmv-virtual-ssts branch from e26643b to cd55934 Compare June 6, 2023 20:26
Copy link
Member Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

TFTR!

@RaduBerinde I agree that we should gate the virtual sstable write paths with this. However none of the write paths are currently merged; once this PR merges, I'll update both #2538 and #2582 to gate their writes on this.

Reviewable status: 4 of 8 files reviewed, all discussions resolved (waiting on @jbowens)


format_major_version.go line 164 at r1 (raw file):

Previously, RaduBerinde wrote…

[nit] sstable

Done.


format_major_version.go line 166 at r1 (raw file):

Previously, RaduBerinde wrote…

[nit] "FMV" is not used anywhere in these comments, I'd expand to "format major version"

Done.


format_major_version.go line 167 at r1 (raw file):

Previously, jbowens (Jackson Owens) wrote…

nit: can we prefix with "Experimental" too for now?

Done.

@itsbilal itsbilal merged commit 0648726 into cockroachdb:master Jun 7, 2023
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.

db: add format major version gating for virtual sstables
4 participants