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

drainer: if all DML is filtered, return true ignore #1320

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Sep 9, 2024

What problem does this PR solve?

Issue Number: close #1317

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update the tidb-ansible repository
  • Need to be included in the release note

Release note

  • No release note
If the whole transaction is filtered, release the memory

Copy link
Contributor

@GMHDBJD GMHDBJD 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 bot added the lgtm label Sep 9, 2024
Copy link

ti-chi-bot bot commented Sep 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, GMHDBJD

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

The pull request process is described here

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

Copy link

ti-chi-bot bot commented Sep 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-09 02:51:31.159919437 +0000 UTC m=+238360.900343377: ☑️ agreed by GMHDBJD.
  • 2024-09-09 03:26:02.149735113 +0000 UTC m=+240431.890159048: ☑️ agreed by D3Hunter.

@@ -660,7 +660,9 @@ func skipDMLEvent(pv *pb.PrewriteValue, schema *Schema, filter *filter.Filter, b
mutation.DeletedRows = mutation.DeletedRows[0:filteredDeleteIdx]
}

muts = append(muts, mutation)
if len(mutation.Sequence) > 0 {
Copy link

Choose a reason for hiding this comment

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

if it's filtered out, len(mutation.Sequence) == 0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's in line 657, where filteredIdx never get ++

@ti-chi-bot ti-chi-bot bot merged commit fc4e5d0 into release-6.5 Sep 9, 2024
6 checks passed
@ti-chi-bot ti-chi-bot bot deleted the v6.5-fix1317 branch September 9, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants