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

pump: Add support to stop write at a limit avaliable space #647

Merged
merged 6 commits into from
Jun 26, 2019

Conversation

july2993
Copy link
Contributor

What problem does this PR solve?

pump: Add support to stop write at a limit avaliable space

What is changed and how it works?

Add a configuration to stop writes at a limit available space size.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    use dd make space less than configured size -> write failed -> delete file make enough space -> write succes

Code changes

Side effects

Related changes

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

@july2993
Copy link
Contributor Author

/run-all-tests

@july2993
Copy link
Contributor Author

/run-all-tests

@@ -30,6 +30,12 @@ pd-urls = "http://127.0.0.1:2379"
# [storage]
# Set to `true` (default) for best reliability, which prevents data loss when there is a power failure.
# sync-log = true

# stop write when disk available space less then the configured size
# 42 MB -> 42000000, 42 mib -> 44040192
Copy link
Collaborator

Choose a reason for hiding this comment

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

one gib is too small, use 10% or 10 gib is better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it may be annoying to set such a limit in a test or development env, how about default 0 and set
10 gib if deployed by ansible ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

if so, use 10% is better, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update to be 10 gib in ac51fc0

@IANTHEREAL
Copy link
Collaborator

Rest LGTM .

pump/storage/storage.go Outdated Show resolved Hide resolved
pump/storage/util.go Outdated Show resolved Hide resolved
pump/storage/storage.go Show resolved Hide resolved
@july2993
Copy link
Contributor Author

/run-all-tests

@IANTHEREAL
Copy link
Collaborator

LGTM

@IANTHEREAL
Copy link
Collaborator

@suzaku PTAL

pump/storage/util.go Outdated Show resolved Hide resolved
@july2993
Copy link
Contributor Author

/run-all-tests

Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@july2993 july2993 merged commit 0aec623 into pingcap:master Jun 26, 2019
@july2993 july2993 deleted the hjh/pump_space branch June 26, 2019 09:39
july2993 added a commit to july2993/tidb-binlog that referenced this pull request Jul 1, 2019
ericsyh pushed a commit that referenced this pull request Jul 2, 2019
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