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: add default-off setting for MVCC range tombstones #86528

Merged

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Aug 21, 2022

This patch adds the default-off cluster setting
storage.mvcc.range_tombstones.enabled to control whether or not to
write MVCC range tombstones. The setting is internal and system-only.
The read path is always active, this only determines whether KV clients
should write them.

A helper function CanUseMVCCRangeTombstones() has also been added.
Callers have not yet been updated to respect this.

Note that any in-flight jobs may not pick up this change, so these need
to be waited out before being certain that the setting has taken effect.

If disabled after being enabled, this will prevent new range tombstones
from being written, but already written tombstones will remain until
GCed. The above note on jobs above also applies in this case.

Release justification: bug fixes and low-risk updates to new functionality

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@nicktrav nicktrav 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 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @dt)

@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstones-setting branch from 87a9574 to 93f682e Compare August 22, 2022 19:25
This patch adds the default-off cluster setting
`storage.mvcc.range_tombstones.enabled` to control whether or not to
write MVCC range tombstones. The setting is internal and system-only.
The read path is always active, this only determines whether KV clients
should write them.

A helper function `CanUseMVCCRangeTombstones()` has also been added.
Callers have not yet been updated to respect this.

Note that any in-flight jobs may not pick up this change, so these need
to be waited out before being certain that the setting has taken effect.

If disabled after being enabled, this will prevent new range tombstones
from being written, but already written tombstones will remain until
GCed. The above note on jobs above also applies in this case.

Release justification: bug fixes and low-risk updates to new functionality

Release note: None
@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstones-setting branch from 93f682e to 1809bbe Compare August 22, 2022 20:12
@erikgrinaker
Copy link
Contributor Author

CI failure appears unrelated (there are no functional changes here anyway).

bors r=msbutler,nicktrav

@craig
Copy link
Contributor

craig bot commented Aug 22, 2022

Build succeeded:

@craig craig bot merged commit 27764b6 into cockroachdb:master Aug 22, 2022
@erikgrinaker erikgrinaker deleted the mvcc-range-tombstones-setting branch August 23, 2022 08:44
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.

4 participants