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

clusterversion,storage: use range tombstones unconditionally in 23.1 #97770

Merged

Conversation

nicktrav
Copy link
Collaborator

@nicktrav nicktrav commented Feb 28, 2023

Currently, MVCC range tombstones are only enabled when the storage.mvcc.range_tombstones.enabled cluster setting is true. Originally, the plan for 23.1 was to remove this cluster setting entirely, which would enable the feature unconditionally. However, it was decided that for 23.1, the setting would remain, along with the utility methods that determine whether or not the feature is enabled.

As there is still an expectation that the feature is enabled in 23.1, add an internal cluster version that is used as a feature gate. If the cluster is at least of version
V23_1_MVCCRangeTombstonesUnconditionallyEnabled, MVCC range tombstones are unconditionally enabled, irrespective of whether the cluster setting is enabled or not.

Fix #91147.

Release note: None.

Epic: CRDB-20465.

@blathers-crl
Copy link

blathers-crl bot commented Feb 28, 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

@nicktrav nicktrav marked this pull request as ready for review February 28, 2023 01:29
@nicktrav nicktrav requested a review from a team as a code owner February 28, 2023 01:29
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 @erikgrinaker, @jbowens, @msbutler, @nicktrav, and @sumeerbhola)


pkg/storage/mvcc.go line 91 at r1 (raw file):

// V23_1_MVCCRangeTombstonesUnconditionallyEnabled, the feature is
// unconditionally enabled.
var MVCCRangeTombstonesEnabled = settings.RegisterBoolSetting(

[nit] maybe rename to MVCCRangeTombstonesEnabledInMixedClusters


pkg/storage/mvcc.go line 94 at r1 (raw file):

	settings.TenantReadOnly,
	"storage.mvcc.range_tombstones.enabled",
	"enables the use of MVCC range tombstones",

[nit] some nuance can be added to this description. Maybe "controls the use of MVCC range tombstones in mixed version clusters; range tombstones are always on in 23.1 clusters".

@nicktrav
Copy link
Collaborator Author

Looks like there's just the one test failure.

@msbutler - any thoughts on how you'd like backupccl.TestDataDriven/in-progress-import-rollback updated to reflect this change? I assume this is failing as the cluster version in the test is beyond the cluster version that enables range tombstones, so we write range tombstones, but the test is expecting the no tombstones?

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

LGTM, agree with Radu's comments.

@nicktrav nicktrav force-pushed the nickt.mvcc-range-tombstones-version-gate branch from 7a6d0c1 to f733158 Compare February 28, 2023 16:05
@nicktrav nicktrav requested review from a team February 28, 2023 16:05
@msbutler
Copy link
Collaborator

this should do the trick! msbutler@9c45bd4

@nicktrav nicktrav force-pushed the nickt.mvcc-range-tombstones-version-gate branch from f733158 to 4dbf890 Compare February 28, 2023 16:24
@nicktrav nicktrav requested a review from a team as a code owner February 28, 2023 16:24
@nicktrav
Copy link
Collaborator Author

this should do the trick!

Indeed. Thanks!

@msbutler - are y'all ok with the DR coverage as it stands in the "range tombstones unconditionaly on in 23.1" case? I'll defer to you as a follow up, if necessary.

All other feedback addressed.

@msbutler
Copy link
Collaborator

from a DR perspective (sql client), i think test coverage is good!

@nicktrav
Copy link
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 28, 2023

Build failed:

@nicktrav
Copy link
Collaborator Author

bors retry

@nicktrav
Copy link
Collaborator Author

Ick, this needs a rebase.

bors cancel

@craig
Copy link
Contributor

craig bot commented Feb 28, 2023

Canceled.

@nicktrav nicktrav force-pushed the nickt.mvcc-range-tombstones-version-gate branch from 4dbf890 to c73f143 Compare February 28, 2023 20:19
@nicktrav nicktrav requested a review from a team as a code owner February 28, 2023 20:19
@nicktrav
Copy link
Collaborator Author

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 28, 2023

Merge conflict.

@nicktrav
Copy link
Collaborator Author

gah! rebase

bors cancel

Currently, MVCC range tombstones are only enabled when the
`storage.mvcc.range_tombstones.enabled` cluster setting is `true`.
Originally, the plan for 23.1 was to remove this cluster setting
entirely, which would enable the feature unconditionally. However, it
was decided that for 23.1, the setting would remain, along with the
utility methods that determine whether or not the feature is enabled.

As there is still an expectation that the feature is enabled in 23.1,
add an internal cluster version that is used as a feature gate. If the
cluster is at least of version
`V23_1_MVCCRangeTombstonesUnconditionallyEnabled`, MVCC range tombstones
are _unconditionally_ enabled, irrespective of whether the cluster
setting is enabled or not.

Fix cockroachdb#91147.

Release note: None.
@nicktrav nicktrav force-pushed the nickt.mvcc-range-tombstones-version-gate branch from c73f143 to 1c3e46d Compare February 28, 2023 22:25
@nicktrav
Copy link
Collaborator Author

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 28, 2023

Build failed:

@nicktrav
Copy link
Collaborator Author

nicktrav commented Mar 1, 2023

bors retry

@craig
Copy link
Contributor

craig bot commented Mar 1, 2023

Build failed:

@nicktrav
Copy link
Collaborator Author

nicktrav commented Mar 1, 2023

bors retry

@craig
Copy link
Contributor

craig bot commented Mar 1, 2023

Build succeeded:

@craig craig bot merged commit 21786aa into cockroachdb:master Mar 1, 2023
@nicktrav nicktrav deleted the nickt.mvcc-range-tombstones-version-gate branch March 1, 2023 14: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.

storage: add unconditional range tombstone cluster version
5 participants