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

api: prevent store limit from changing to zero (#2586) #2588

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #2586 to release-4.0


What problem does this PR solve?

Closes #2584.

What is changed and how it works?

When setting the store limit, we first check if it is zero and reject the request if it is.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Prevent store limit from changing to zero

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2588 into release-4.0 will increase coverage by 0.07%.
The diff coverage is 50.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #2588      +/-   ##
===============================================
+ Coverage        77.13%   77.21%   +0.07%     
===============================================
  Files              205      205              
  Lines            22129    22129              
===============================================
+ Hits             17070    17086      +16     
+ Misses            3756     3742      -14     
+ Partials          1303     1301       -2     
Impacted Files Coverage Δ
server/api/store.go 66.32% <50.00%> (+1.02%) ⬆️
server/kv/etcd_kv.go 84.41% <0.00%> (-3.90%) ⬇️
pkg/dashboard/adapter/manager.go 89.62% <0.00%> (-3.78%) ⬇️
server/cluster/coordinator.go 74.52% <0.00%> (-2.20%) ⬇️
server/handler.go 50.53% <0.00%> (-0.44%) ⬇️
server/server.go 76.48% <0.00%> (-0.31%) ⬇️
pkg/btree/btree.go 87.65% <0.00%> (+0.80%) ⬆️
pkg/etcdutil/etcdutil.go 84.05% <0.00%> (+1.44%) ⬆️
pkg/mock/mockhbstream/mockhbstream.go 90.76% <0.00%> (+1.53%) ⬆️
server/tso/tso.go 83.21% <0.00%> (+2.18%) ⬆️
... and 3 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 0bd6bbd...df9f972. Read the comment docs.

Copy link
Member

@HunDunDM HunDunDM left a comment

Choose a reason for hiding this comment

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

LGTM

@HunDunDM HunDunDM modified the milestones: v4.0.2, v4.0.3 Jun 29, 2020
@nolouch
Copy link
Contributor

nolouch commented Jul 1, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @nolouch, you don't have permission to trigger auto merge event on this branch.
The version releasement is in progress.

@disksing
Copy link
Contributor

disksing commented Jul 1, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @disksing, you don't have permission to trigger auto merge event on this branch.
The version releasement is in progress.

@HunDunDM
Copy link
Member

HunDunDM commented Jul 2, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 2, 2020
@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2565

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit a62699e into tikv:release-4.0 Jul 2, 2020
@lhy1024 lhy1024 added the type/bugfix This PR fixes a bug. label Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api HTTP API. status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants