Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

.*: add compactor for syncer - #2261

Open
GMHDBJD wants to merge 113 commits into
pingcap:masterfrom
GMHDBJD:newCompactor
Open

.*: add compactor for syncer#2261
GMHDBJD wants to merge 113 commits into
pingcap:masterfrom
GMHDBJD:newCompactor

Conversation

@GMHDBJD

@GMHDBJD GMHDBJD commented Oct 25, 2021

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

add compactor to compact dml

What is changed and how it works?

# Assuming that UPDATE statement does not update the primary key. If no primary key, choose a UNIQUE NOT NULL Key.
# If UPDATE statement update the primary key or unique key, split it into one DELETE and one INSERT statement.
# We list two successive DMLs of one row and the result that can be compacted. X means this situation will not happen.
INSERT + INSERT => X
INSERT + UPDATE => INSERT
INSERT + DELETE => DELETE
UPDATE + INSERT => X
UPDATE + UPDATE => UPDATE
UPDATE + DELETE => DELETE
DELETE + INSERT => UPDATE
DELETE + UPDATE => X
DELETE + DELETE => X

Check List

Tests

  • Integration test
  • UT

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

Labels

needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 needs-update-docs Should update docs after this PR is merged. Remove this label once the docs are updated size/XXL status/LGT2 Two reviewers already commented LGTM, ready for merge status/PTAL This PR is ready for review. Add this label back after committing new changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants