Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner, executor: support Change and ChangeExec #9789

Conversation

@aliiohs
Copy link
Contributor

commented Mar 19, 2019

What problem does this PR solve?

support update pump or drainer status.
proposal: #9201

What is changed and how it works?

  1. support sql like "change drainer to node_state='paused' for NodeID '127.0.0.1:8250';"
    already do in pingcap/parser#243
  2. update parser's version
  3. handle changestmt, update pump/drainer's status in pd.(tip: can't pause/offline pump/drainer, just modify status in pd)

Check List

Tests

  • Manual test (it is difficult to create fork status information in pd in unit test now, so just have manual test, execute sql change pump/drainer's status, and show pump/drainer's status to check it)

Related changes

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

aliiohs added some commits Mar 19, 2019

fix
fix
@codecov

This comment has been minimized.

Copy link

commented Mar 19, 2019

Codecov Report

Merging #9789 into master will decrease coverage by 0.0185%.
The diff coverage is 0%.

@@               Coverage Diff               @@
##            master      #9789        +/-   ##
===============================================
- Coverage   67.143%   67.1244%   -0.0186%     
===============================================
  Files          381        382         +1     
  Lines        80056      80090        +34     
===============================================
+ Hits         53752      53760         +8     
- Misses       21507      21535        +28     
+ Partials      4797       4795         -2
fix
Show resolved Hide resolved executor/change.go Outdated
fix
Show resolved Hide resolved executor/builder.go
Show resolved Hide resolved executor/change.go
Show resolved Hide resolved executor/change.go
Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved planner/core/planbuilder.go

aliiohs added some commits Mar 19, 2019

fix
fix
@aliiohs

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2019

i don't know how to add a test case for this, but @WangXiangUSTC already Manually tested successfully。

aliiohs and others added some commits Mar 20, 2019

@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

/run-all-tests

Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved executor/change.go Outdated
Show resolved Hide resolved planner/core/common_plans.go Outdated

aliiohs added some commits Mar 20, 2019

Merge remote-tracking branch 'origin/Support_update_pump_or_drainer_s…
…tatus_lastest' into Support_update_pump_or_drainer_status_lastest
fix
fix
@lamxTyler
Copy link
Member

left a comment

LGTM

@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

/run-all-tests

@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

LGTM

@WangXiangUSTC WangXiangUSTC force-pushed the aliiohs:Support_update_pump_or_drainer_status_lastest branch from ae18f5c to 39bd4dc Mar 21, 2019

fix
@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

/run-all-tests


import (
"context"
"github.com/pingcap/parser/ast"

This comment has been minimized.

Copy link
@XuHuaiyu

XuHuaiyu Mar 21, 2019

Contributor

Move this import down.

@WangXiangUSTC WangXiangUSTC force-pushed the aliiohs:Support_update_pump_or_drainer_status_lastest branch from bcdb0a4 to 7fe3ad1 Mar 21, 2019

WangXiangUSTC added some commits Mar 21, 2019

@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

/run-all-tests

1 similar comment
@WangXiangUSTC

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

/run-all-tests

@XuHuaiyu
Copy link
Contributor

left a comment

LGTM

@WangXiangUSTC WangXiangUSTC merged commit dd3ca22 into pingcap:master Mar 21, 2019

8 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 0% of diff hit (target 0%)
Details
codecov/project 67.0982% (-0.0448%) compared to cca7ec3
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/code_coverage Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@WangXiangUSTC WangXiangUSTC deleted the aliiohs:Support_update_pump_or_drainer_status_lastest branch Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.