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

tools: fix panic when using stores show limit #1807

Merged
merged 2 commits into from
Oct 16, 2019
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Oct 15, 2019

What problem does this PR solve?

If we firstly use stores remove-tombstone and then calling stores show limit in pd-ctl. It will panic due to the nil pointer.

What is changed and how it works?

This PR fixes it by removing the store limit when removing a tombstone store.

Check List

Tests

  • Unit test

Related changes

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

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx added type/bug The issue is confirmed as a bug. area/pdctl labels Oct 15, 2019
@rleungx rleungx added needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. labels Oct 15, 2019
@codecov-io
Copy link

Codecov Report

Merging #1807 into master will increase coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1807      +/-   ##
==========================================
+ Coverage   77.95%   78.13%   +0.17%     
==========================================
  Files         167      167              
  Lines       16468    16473       +5     
==========================================
+ Hits        12838    12871      +33     
+ Misses       2592     2562      -30     
- Partials     1038     1040       +2
Impacted Files Coverage Δ
server/schedule/operator_controller.go 90.99% <100%> (+0.08%) ⬆️
server/cluster.go 84.62% <100%> (-0.24%) ⬇️
pkg/etcdutil/etcdutil.go 84.05% <0%> (-4.35%) ⬇️
server/member/leader.go 77.55% <0%> (-3.58%) ⬇️
server/schedule/operator/operator.go 84.98% <0%> (-0.55%) ⬇️
server/grpc_service.go 57.91% <0%> (+0.21%) ⬆️
server/server.go 82.6% <0%> (+0.56%) ⬆️
server/handler.go 52.14% <0%> (+0.75%) ⬆️
pkg/btree/btree.go 86.14% <0%> (+0.8%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 381d36b...cde28d5. Read the comment docs.

Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

LGTM. do we need to add unit test about it?

Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

LGTM

@lhy1024 lhy1024 added the status/can-merge Indicates a PR has been approved by a committer. label Oct 16, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 16, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Oct 16, 2019

@rleungx merge failed.

@rleungx
Copy link
Member Author

rleungx commented Oct 16, 2019

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Oct 16, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Oct 16, 2019

cherry pick to release-3.0 in PR #1808

@sre-bot
Copy link
Contributor

sre-bot commented Oct 16, 2019

cherry pick to release-3.1 in PR #1809

sre-bot added a commit that referenced this pull request Oct 16, 2019
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. status/can-merge Indicates a PR has been approved by a committer. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants