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

config: move storage check after initializeTempDir #16257

Merged
merged 4 commits into from
Apr 13, 2020

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Apr 9, 2020

What problem does this PR solve?

Move storage check after initializeTempDir so that avoiding the capacity we get is smaller than the fact.

Related changes

  • Need to cherry-pick to the release branch

Release note

None

@Yisaer Yisaer requested a review from SunRunAway April 9, 2020 13:39
Comment on lines -875 to -877
} else if capacityByte > uint64(c.TempStorageQuota) {
return fmt.Errorf("value of [temp-storage-quota](%d byte) exceeds the capacity(%d byte) of the [%s] directory", c.TempStorageQuota, capacityByte, c.TempStoragePath)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original logic here is wrong, I correct it in this request.

@codecov
Copy link

codecov bot commented Apr 9, 2020

Codecov Report

Merging #16257 into master will not change coverage by %.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #16257   +/-   ##
===========================================
  Coverage   80.4897%   80.4897%           
===========================================
  Files           506        506           
  Lines        137446     137446           
===========================================
  Hits         110630     110630           
  Misses        18305      18305           
  Partials       8511       8511           

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway SunRunAway requested a review from qw4990 April 9, 2020 14:39
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Apr 13, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 13, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 13, 2020

@Yisaer merge failed.

@Yisaer
Copy link
Contributor Author

Yisaer commented Apr 13, 2020

/run-all-tests

@Yisaer
Copy link
Contributor Author

Yisaer commented Apr 13, 2020

/run-unit-test

@Yisaer
Copy link
Contributor Author

Yisaer commented Apr 13, 2020

/run-integration-copr-test

@zz-jason zz-jason merged commit 10907ce into pingcap:master Apr 13, 2020
@XuHuaiyu
Copy link
Contributor

@Yisaer Please cherry-pick this commit to release-4.0

@SunRunAway
Copy link
Contributor

/run-cherry-picker

@sre-bot
Copy link
Contributor

sre-bot commented Apr 16, 2020

cherry pick to release-4.0 in PR #16462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants