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

storage: Write sstables in v4 format for shared ingestions #108866

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

itsbilal
Copy link
Member

We require sstables to be written with obsolete bits for shared sstable ingestion to work correctly. This change moves to writing sstables with the new format if the cluster version is high enough.

Unblocks #107394.

Epic: none

Release note: None

@itsbilal itsbilal requested a review from a team as a code owner August 16, 2023 19:55
@blathers-crl
Copy link

blathers-crl bot commented Aug 16, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

We require sstables to be written with obsolete bits
for shared sstable ingestion to work correctly. This
change moves to writing sstables with the new format
if the cluster version is high enough.

Unblocks cockroachdb#107394.

Epic: none

Release note: None
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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @itsbilal)


pkg/storage/sst_writer.go line 77 at r1 (raw file):

		format = sstable.TableFormatPebblev3
	}
	if cs.Version.IsActive(ctx, clusterversion.V23_2_PebbleFormatVirtualSSTables) && ValueBlocksEnabled.Get(&cs.SV) {

Seems like things will be fragile w.r.t to the value-blocks-enabled setting? Like if it's temporarily turned off, we will hit an error at restore time?

@itsbilal
Copy link
Member Author

pkg/storage/sst_writer.go line 77 at r1 (raw file):

Previously, RaduBerinde wrote…

Seems like things will be fragile w.r.t to the value-blocks-enabled setting? Like if it's temporarily turned off, we will hit an error at restore time?

Value blocks default to on and are really only a cluster setting for metamorphic testing it seems. I didn't want to eliminate that surface area of tests by forcing the use of v4 for all new builds, so I kept it this way. We can revisit this closer to when disagg storage moves out of tech preview (by when value blocks would have gotten much more testing). The error will really only be hit when we ingest a shared table that's not format v4.

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:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @itsbilal)


pkg/storage/sst_writer.go line 77 at r1 (raw file):

Previously, itsbilal (Bilal Akhtar) wrote…

Value blocks default to on and are really only a cluster setting for metamorphic testing it seems. I didn't want to eliminate that surface area of tests by forcing the use of v4 for all new builds, so I kept it this way. We can revisit this closer to when disagg storage moves out of tech preview (by when value blocks would have gotten much more testing). The error will really only be hit when we ingest a shared table that's not format v4.

Makes sense, thanks!

@itsbilal
Copy link
Member Author

TFTR!

bors r=RaduBerinde

@craig
Copy link
Contributor

craig bot commented Aug 17, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 17, 2023

Build succeeded:

@craig craig bot merged commit 02065f5 into cockroachdb:master Aug 17, 2023
2 checks passed
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