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

fix(load): stop goroutines after restore returned #744

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

csuzhangxc
Copy link
Member

What problem does this PR solve?

fix #743

What is changed and how it works?

call cancel after Restore returned.

Check List

Tests

Code changes

  • Has exported variable/fields change

Related changes

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

@csuzhangxc csuzhangxc added priority/normal Minor change, requires approval from ≥1 primary reviewer 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 Jun 16, 2020
@csuzhangxc csuzhangxc added this to the v1.0.6 milestone Jun 16, 2020
@@ -294,10 +294,10 @@ func (s *testTaskCheckerSuite) TestIsResumableError(c *check.C) {
// only DM new error is checked
{&tmysql.SQLError{1105, "unsupported modify column length 20 is less than origin 40", tmysql.DefaultMySQLState}, true},
{&tmysql.SQLError{1105, "unsupported drop integer primary key", tmysql.DefaultMySQLState}, true},
{nil, true},
Copy link
Member Author

Choose a reason for hiding this comment

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

it already exists in L310.

@csuzhangxc
Copy link
Member Author

/run-all-tests

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

@csuzhangxc csuzhangxc added status/WIP This PR is still work in progress and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Jun 17, 2020
@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

{terror.ErrDBExecuteFailed.Generate("file test.t3.sql: execute statement failed: USE `test_abc`;: context canceled"), true},
{terror.ErrDBExecuteFailed.Delegate(&tmysql.SQLError{1105, "unsupported modify column length 20 is less than origin 40", tmysql.DefaultMySQLState}, "alter table t modify col varchar(20)"), false},
{terror.ErrDBExecuteFailed.Delegate(&tmysql.SQLError{1105, "unsupported drop integer primary key", tmysql.DefaultMySQLState}, "alter table t drop column id"), false},
{terror.ErrDBExecuteFailed.Delegate(&tmysql.SQLError{1067, "Invalid default value for 'ct'", tmysql.DefaultMySQLState}, "CREATE TABLE `tbl` (`c1` int(11) NOT NULL,`ct` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',PRIMARY KEY (`c1`)) ENGINE=InnoDB DEFAULT CHARSET=latin1"), false},
Copy link
Member Author

Choose a reason for hiding this comment

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

we may need to add an independent error codes section later.

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

2 similar comments
@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

@csuzhangxc csuzhangxc added status/PTAL This PR is ready for review. Add this label back after committing new changes and removed status/WIP This PR is still work in progress labels Jun 17, 2020
@csuzhangxc
Copy link
Member Author

@WangXiangUSTC @GMHDBJD PTAL

@csuzhangxc csuzhangxc changed the title fix(load): stop goroutines after process returned fix(load): stop goroutines after restore returned Jun 17, 2020
@csuzhangxc
Copy link
Member Author

/run-all-tests tidb=v4.0.0

Copy link
Collaborator

@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

@GMHDBJD GMHDBJD 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 Jun 17, 2020
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 this to Reviewer approved in Stability Improvement via automation Jun 17, 2020
@WangXiangUSTC WangXiangUSTC added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Jun 17, 2020
@csuzhangxc csuzhangxc merged commit 76cf5b6 into pingcap:master Jun 17, 2020
Stability Improvement automation moved this from Reviewer approved to Done Jun 17, 2020
@csuzhangxc csuzhangxc deleted the fix-load-pause branch June 17, 2020 05:48
@ti-srebot
Copy link

cherry pick to release-1.0 failed

csuzhangxc added a commit to csuzhangxc/dm that referenced this pull request Jun 17, 2020
@csuzhangxc csuzhangxc 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 already-update-release-note The release note is updated. Add this label once the release note is updated 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 needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Jun 17, 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/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge type/bug-fix Bug fix
Projects
Development

Successfully merging this pull request may close these issues.

the stage of load unit is still running after encountered "Error 1067: Invalid default value for 'ct'"
4 participants