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

ddl: pause subtask when exec ddl err #1055

Merged
merged 4 commits into from
Sep 18, 2020
Merged

Conversation

GMHDBJD
Copy link
Collaborator

@GMHDBJD GMHDBJD commented Sep 17, 2020

What problem does this PR solve?

close #984

What is changed and how it works?

  • report error when execute ddl fail in dowsteam TiDB
  • omit error in syncDDL caller to avoid duplicate error message

Check List

Tests

  • Integration test

@GMHDBJD GMHDBJD 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 labels Sep 17, 2020
syncer/syncer.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@lance6716 lance6716 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

s.appendExecErrors(&ExecErrorContext{
err: err,
location: sqlJob.currentLocation.Clone(),
jobs: fmt.Sprintf("%v", sqlJob.ddls),
})
continue
Copy link
Collaborator

Choose a reason for hiding this comment

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

forward: "can we just rollback checkpoint as we did before?" #1032 (comment)

I think that's no need, we could use caller's rollback

@lance6716
Copy link
Collaborator

/run-all-tests

[2020-09-17T10:52:23.616Z] FAIL: server_test.go:1293: testMaster.TestOfflineMember
[2020-09-17T10:52:23.616Z] 
[2020-09-17T10:52:23.616Z] server_test.go:1357:
[2020-09-17T10:52:23.616Z]     c.Assert(err, check.IsNil)
[2020-09-17T10:52:23.616Z] ... value *status.statusError = &status.statusError{Code:2, Message:"[code=38043:class=dm-master:scope=internal:level=high], Message: master is not leader, and can't forward request to leader", Details:[]*any.Any(nil), XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0} ("rpc error: code = Unknown desc = [code=38043:class=dm-master:scope=internal:level=high], Message: master is not leader, and can't forward request to leader")

@lance6716
Copy link
Collaborator

LGTM

@ti-srebot ti-srebot added the status/LGT1 One reviewer already commented LGTM label Sep 18, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Sep 18, 2020
@csuzhangxc csuzhangxc added this to the v2.0.0 RC.3 milestone Sep 18, 2020
@csuzhangxc csuzhangxc merged commit bdf8b5b into pingcap:master Sep 18, 2020
@csuzhangxc csuzhangxc added the needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 label Sep 18, 2020
@csuzhangxc
Copy link
Member

/run-cherry-picker

@ti-srebot
Copy link

cherry pick to release-2.0 in PR #1059

@ti-srebot ti-srebot added already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked and removed needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 labels Sep 18, 2020
csuzhangxc pushed a commit that referenced this pull request Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge status/PTAL This PR is ready for review. Add this label back after committing new changes type/bug-fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle schema tracker newer than downstream TiDB
4 participants