Skip to content

tikvpv, kvrpcpb: Add RawCompareAndDelete API#1434

Open
healthwaite wants to merge 1 commit intopingcap:masterfrom
healthwaite:compare-and-delete-new-api
Open

tikvpv, kvrpcpb: Add RawCompareAndDelete API#1434
healthwaite wants to merge 1 commit intopingcap:masterfrom
healthwaite:compare-and-delete-new-api

Conversation

@healthwaite
Copy link
Contributor

@healthwaite healthwaite commented Mar 19, 2026

This commit re-implements compare-and-delete by creating a new RawCompareAndDelete API. Previously compare-and-delete piggy-backed on the RawCompareAndSwap API by introducing a delete flag into the RawCASRequest message. As described in issue tikv/tikv#19462 this can cause silent data corruption if a newer client is talking to a server which doesn't support compare-and-delete. In this PR:

  • Add RawCADRequest/Response messages
  • Add RawCompareAndDelete RPC
  • Deprecate delete flag in RawCASRequest: in practice we could actually just remove this field as no version of the server of client has been release which makes use of it. Let me know if you'd prefer to remove it.

Accompanying tikv PR: tikv/tikv#19465
Accompanying issue: tikv/tikv#19462

Signed-off-by: Alex Reid <areid@akamai.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 19, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cfzjywxk for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant