Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

dm: add compactor for syncer #3162

Merged
merged 9 commits into from
Oct 29, 2021
Merged

dm: add compactor for syncer #3162

merged 9 commits into from
Oct 29, 2021

Conversation

GMHDBJD
Copy link
Contributor

@GMHDBJD GMHDBJD commented Oct 28, 2021

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

  • Unit test
  • Integration test
Support compacting DML during the incremental replication

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 28, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Ehco1996
  • lance6716

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 28, 2021
@CLAassistant
Copy link

CLAassistant commented Oct 28, 2021

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 28, 2021
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 28, 2021

@Ehco1996 @lance6716 PTAL fefa97c

@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 28, 2021

/run-all-tests
/run-dm-integration-tests

@GMHDBJD GMHDBJD added the status/ptal Could you please take a look? label Oct 28, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 28, 2021
Copy link
Contributor

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 28, 2021
@lance6716
Copy link
Contributor

/hold
waiting address comment in dm pr

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2021
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 29, 2021

/run-all-tests
/run-dm-integration-tests

@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 29, 2021

/run-all-tests

@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 29, 2021

@glorv
Do you have any other comments

Copy link
Contributor

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

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

rest LGTM

@glorv
Copy link
Contributor

glorv commented Oct 29, 2021

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 29, 2021
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 29, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: bd151d1

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 29, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #3162 (bd151d1) into master (3c3b915) will decrease coverage by 0.3141%.
The diff coverage is 51.4199%.

@@               Coverage Diff                @@
##             master      #3162        +/-   ##
================================================
- Coverage   57.2251%   56.9109%   -0.3142%     
================================================
  Files           163        210        +47     
  Lines         19453      22667      +3214     
================================================
+ Hits          11132      12900      +1768     
- Misses         7261       8451      +1190     
- Partials       1060       1316       +256     

@ti-chi-bot ti-chi-bot merged commit 8e70d12 into pingcap:master Oct 29, 2021
@GMHDBJD GMHDBJD deleted the compactor branch October 29, 2021 04:35
@Ehco1996 Ehco1996 added this to the v5.3.0 milestone Nov 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. status/ptal Could you please take a look?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants