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

batcheval: refactor delete range #137803

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffswenson
Copy link
Collaborator

This refactors delete range to make it clear the implementation has three mutually exclusive implementations. The idempotent implementation is used by components like schema changer to delete whole table spans. The predicates implementation is used by import rollback. The transactional implementation has many users including sql and the time series db.

Release Note: none
Informs: #131844

This refactors delete range to make it clear the implementation has
three mutually exclusive implementations. The idempotent implementation
is used by components like schema changer to delete whole table spans.
The `predicates` implementation is used by import rollback. The
transactional implementation has many users including sql and the time
series db.

Release Note: none
Informs: cockroachdb#131844
@jeffswenson jeffswenson requested a review from a team as a code owner December 19, 2024 21:54
Copy link

blathers-crl bot commented Dec 19, 2024

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

Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

I like it. Much easier to follow. Just a few new lines of duplication, but that seems worth it given the increased clarity.

}
}

func deleteRangeIdempotent(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure on the name of this one. Seems to me from the logic that we'll come here even if IdempotentTombstone is false? I'm not sure if I have a better name. Perhaps deleteRangeUsingTombostone to line up to the underlying storage call. That too is a bit of a misnomer since deleteRangeWithPredicate also uses tombstones.

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