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

remove support for prefix replacement #3405

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

RaduBerinde
Copy link
Member

Remove PrefixReplacement in favor of SyntheticPrefix. The general prefix replacement turns out to be too difficult so we will instead strip the prefix when writing out the backup files.

@RaduBerinde RaduBerinde requested review from dt, msbutler, a team and aadityasondhi and removed request for aadityasondhi March 13, 2024 23:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde force-pushed the no-prefix-repl branch 2 times, most recently from f4855ad to a7318cd Compare March 13, 2024 23:16
Copy link
Contributor

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!!

@@ -865,14 +861,14 @@ func (m *FileMetadata) Validate(cmp Compare, formatKey base.FormatKey) error {
return base.CorruptionErrorf("file metadata FileBacking not set")
}

if m.PrefixReplacement != nil {
if m.SyntheticPrefix.IsSet() {
if !m.Virtual {
return base.CorruptionErrorf("prefix replacement rule set with non-virtual file")
Copy link
Contributor

Choose a reason for hiding this comment

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

uber nit: these error messages could be updated to use the phrase "synthetic prefix" instead of "prefix replacement"

@@ -385,18 +385,19 @@ func (v *VersionEdit) Decode(r io.Reader) error {
}

case customTagPrefixRewrite:
// We used to have a content prefix; we no longer use it.
Copy link
Contributor

Choose a reason for hiding this comment

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

why can't we completely delete this content prefix logic?

@RaduBerinde
Copy link
Member Author

internal/manifest/version_edit.go line 388 at r1 (raw file):

Previously, msbutler (Michael Butler) wrote…

why can't we completely delete this content prefix logic?

We can, but everybody who is currently running experiments will have to wipe their stores.. Seemed like keeping that extra byte would be fine.

We could also add a new tag and then retire this tag a bit later, not sure it's worth the trouble though.

Remove `PrefixReplacement` in favor of `SyntheticPrefix`. The general
prefix replacement turns out to be too difficult so we will instead
strip the prefix when writing out the backup files.
Copy link
Member Author

@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.

TFTR!

Reviewable status: 0 of 21 files reviewed, 2 unresolved discussions (waiting on @dt and @msbutler)


internal/manifest/version.go line 866 at r1 (raw file):

Previously, msbutler (Michael Butler) wrote…

uber nit: these error messages could be updated to use the phrase "synthetic prefix" instead of "prefix replacement"

Done.


internal/manifest/version_edit.go line 388 at r1 (raw file):

Previously, RaduBerinde wrote…

We can, but everybody who is currently running experiments will have to wipe their stores.. Seemed like keeping that extra byte would be fine.

We could also add a new tag and then retire this tag a bit later, not sure it's worth the trouble though.

Ok I cleaned this up as discussed offline.

@RaduBerinde RaduBerinde merged commit 3b8e70c into cockroachdb:master Mar 14, 2024
11 checks passed
@RaduBerinde RaduBerinde deleted the no-prefix-repl branch March 14, 2024 16:54
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