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) #313

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

sre-bot
Copy link

@sre-bot sre-bot commented Oct 16, 2019

cherry-pick #312 to release-1.0


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

@sre-bot sre-bot added priority/important Major change, requires approval from ≥2 primary reviewers priority/release-blocker This PR blocks a release. Please review it ASAP. needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport) labels Oct 16, 2019
@sre-bot sre-bot requested a review from amyangfei October 16, 2019 06:00
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 the status/LGT1 One reviewer already commented LGTM label Oct 16, 2019
@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

❗ No coverage uploaded for pull request base (release-1.0@d65b307). Click here to learn what that means.
The diff coverage is 85.7142%.

@@               Coverage Diff                @@
##             release-1.0       #313   +/-   ##
================================================
  Coverage               ?   60.1918%           
================================================
  Files                  ?        134           
  Lines                  ?      14806           
  Branches               ?          0           
================================================
  Hits                   ?       8912           
  Misses                 ?       5057           
  Partials               ?        837

Copy link
Contributor

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

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

LGTM

@WangXiangUSTC WangXiangUSTC 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 3add674 into pingcap:release-1.0 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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 type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants