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

add node-id cmd to specify drainer's node-id #684

Merged
merged 8 commits into from
Jul 23, 2019

Conversation

lichunzhu
Copy link
Contributor

What problem does this PR solve?

TOOL-1410

What is changed and how it works?

Modify drainer/server.go. If user specifies a node-id, drainer ID will be set as this value. If not, drainer will automatically generate a node ID referring to the listening host name and port.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    • Change the tests/run.sh:119 from run_drainer -L debug &
      to run_drainer -L debug -node-id binlog:group &
    • Execute ./tests/run.sh and check /tmp/tidb-binlog-test/drainer.log
    • Execution result without change tests/run.sh:119:
      image
    • Execution result after change tests/run.sh:119:
      image

Code changes

Side effects

Related changes

cmd/drainer/README.md Outdated Show resolved Hide resolved
drainer/config.go Outdated Show resolved Hide resolved
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.

rest LGTM

drainer/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@suzaku suzaku left a comment

Choose a reason for hiding this comment

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

LGTM

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

@lichunzhu lichunzhu merged commit 7505df0 into pingcap:master Jul 23, 2019
@lichunzhu lichunzhu deleted the czli/drainer/addNodeIDCMD branch July 23, 2019 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants