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

*: add two black DML cases for auto recovery; fix panic when commit DML txn failed #312

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

csuzhangxc
Copy link
Member

What problem does this PR solve?

  • do not automatically recovery task for Duplicate entry and Data too long for column error
  • fix panic when committing DML txn failed
panic: runtime error: index out of range

goroutine 213 [running]:
github.com/pingcap/dm/syncer.(*Syncer).sync.func3(0xc008504eb0, 0xc008504e37)
	/Users/zhangxc/gopath/src/github.com/csuzhangxc/dm/syncer/syncer.go:953 +0x91e
github.com/pingcap/dm/syncer.(*Syncer).sync(0xc00019d400, 0xc008504f88, 0xc000044998, 0x3, 0xc000448be0, 0xc000353d40)
	/Users/zhangxc/gopath/src/github.com/csuzhangxc/dm/syncer/syncer.go:993 +0x483
github.com/pingcap/dm/syncer.(*Syncer).Run.func2(0x24e1c00, 0xc00004ae40, 0xc00019d400, 0xe, 0xc000044998, 0x3)
	/Users/zhangxc/gopath/src/github.com/csuzhangxc/dm/syncer/syncer.go:1062 +0xdf
created by github.com/pingcap/dm/syncer.(*Syncer).Run
	/Users/zhangxc/gopath/src/github.com/csuzhangxc/dm/syncer/syncer.go:1059 +0x4ea

What is changed and how it works?

  • add two black DML cases for auto recovery
  • return len(queries)-1 when committing failed

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

@csuzhangxc csuzhangxc added priority/important Major change, requires approval from ≥2 primary reviewers status/PTAL This PR is ready for review. Add this label back after committing new changes type/bug-fix Bug fix needs-cherry-pick-release-1.0 This PR should be cherry-picked to release-1.0. Remove this label after cherry-picked to release-1.0 needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Oct 16, 2019
@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #312 into master will increase coverage by 0.1096%.
The diff coverage is 85.7142%.

@@               Coverage Diff                @@
##             master       #312        +/-   ##
================================================
+ Coverage   60.0955%   60.2051%   +0.1096%     
================================================
  Files           134        134                
  Lines         14858      14816        -42     
================================================
- Hits           8929       8920         -9     
+ Misses         5084       5057        -27     
+ Partials        845        839         -6

@csuzhangxc
Copy link
Member Author

@WangXiangUSTC @amyangfei PTAL

@csuzhangxc csuzhangxc added the priority/release-blocker This PR blocks a release. Please review it ASAP. label Oct 16, 2019
@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Oct 16, 2019
Copy link
Contributor

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

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

LGTM

@amyangfei amyangfei added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Oct 16, 2019
@csuzhangxc csuzhangxc merged commit 65cc023 into pingcap:master Oct 16, 2019
@csuzhangxc csuzhangxc deleted the atuo-recovery-black branch October 16, 2019 05:59
@sre-bot
Copy link

sre-bot commented Oct 16, 2019

cherry pick to release-1.0 in PR #313

@sre-bot sre-bot added already-cherry-pick-1.0 The related PR is already cherry-picked to release-1.0. Add this label once the PR is cherry-picked and removed needs-cherry-pick-release-1.0 This PR should be cherry-picked to release-1.0. Remove this label after cherry-picked to release-1.0 labels Oct 16, 2019
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Nov 1, 2019
lichunzhu pushed a commit to lichunzhu/dm that referenced this pull request Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-1.0 The related PR is already cherry-picked to release-1.0. Add this label once the PR is cherry-picked already-update-release-note The release note is updated. Add this label once the release note is updated priority/important Major change, requires approval from ≥2 primary reviewers priority/release-blocker This PR blocks a release. Please review it ASAP. status/LGT2 Two reviewers already commented LGTM, ready for merge type/bug-fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants