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

*: fix executing shard DDL with mismatched request (#336) #338

Merged
merged 10 commits into from
Oct 28, 2019

Conversation

sre-bot
Copy link

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

cherry-pick #336 to release-1.0


What problem does this PR solve?

  1. DM-worker does not verify the ExecDDLRequest from the DM-master
  2. DM-master may send duplicate ExecDDLRequest to DM-worker (in order to support re-fetching DDL info from DM-worker after DM-master restarted)

example:

  1. execute ADD INDEX idx1
  2. duplicate ADD INDEX idx1 request sent
  3. ADD COLUMN c1 synced in DM-worker
  4. duplicate request used, ADD COLUMN c1 executed, but ADD COLUMN c1 in other DM-workers not synced yet.

ref: https://internal.pingcap.net/jira/browse/ONCALL-745

What is changed and how it works?

  1. do not re-send DDL execution request in most scenarios
    1. ignore the invalid connection for ADD INDEX
    2. decrease DDL DB execution timeout, increase DDL gRPC execution request
  2. ignore duplicate DDL execution request
    • verify DDL if possible

Check List

Tests

  • Unit test
  • Integration 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 28, 2019
@codecov
Copy link

codecov bot commented Oct 28, 2019

Codecov Report

Merging #338 into release-1.0 will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           release-1.0      #338   +/-   ##
=============================================
  Coverage       60.147%   60.147%           
=============================================
  Files              135       135           
  Lines            15236     15236           
=============================================
  Hits              9164      9164           
  Misses            5173      5173           
  Partials           899       899

@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC added the status/LGT1 One reviewer already commented LGTM label Oct 28, 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 28, 2019
@csuzhangxc csuzhangxc merged commit 2ce7693 into pingcap:release-1.0 Oct 28, 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