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

CDC Server support data-dir (#1879) #2069

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #1879

What problem does this PR solve?

This PR makes TiCDC support --data-dir at the server level.

What is changed and how it works?

  • --data-dir is supported at the server level, default to "", if not set, it will be set by conditions:
    • if there is no other changefeed, /tmp/cdc_data will be set as default data-dir
    • if there is any changefeed with the --sort-dir set, choose the valid one with the largest available space as data-dir.
      • if there are no candidates who meet the requirement, server start failed
  • --sort-dir set at both server level and changefeed level won't take effect, and default to /tmp/sorter, this means it can not be changed by both command flag or config file
    • sort dir of the server and changefeed will be set as /{data-dir}/tmp/sorter
  • during server running, if the available space is lower than 10% of the disk, serve running will fail, due to trying to consume disk space (create new sort temporary file)
  • warning user when set data dir and space unavailable.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to update key monitor metrics in both TiCDC document and official document

Release note

@ti-chi-bot ti-chi-bot added do-not-merge/cherry-pick-not-approved release-blocker This issue blocks a release. Please solve it ASAP. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. labels Jun 16, 2021
@ti-chi-bot ti-chi-bot requested a review from overvenus June 16, 2021 12:49
@amyangfei amyangfei removed the release-blocker This issue blocks a release. Please solve it ASAP. label Jun 17, 2021
@amyangfei amyangfei added this to the v4.0.14 milestone Jun 17, 2021
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 23, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 28, 2021
@ben1009
Copy link
Contributor

ben1009 commented Jun 30, 2021

@3AceShowHand seems there are conflicts need taking care of

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2021
@CLAassistant
Copy link

CLAassistant commented Jul 1, 2021

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2021
@3AceShowHand 3AceShowHand force-pushed the cherry-pick-1879-to-release-4.0 branch from ea27660 to c47682e Compare July 6, 2021 02:38
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2021
@lonng lonng added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Jul 6, 2021
@3AceShowHand
Copy link
Contributor

/run-all-tests

@amyangfei
Copy link
Contributor

/run-integration-tests

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 8, 2021
@3AceShowHand
Copy link
Contributor

/run-all-tests

@3AceShowHand
Copy link
Contributor

/run-all-tests

@3AceShowHand
Copy link
Contributor

/run-integration-tests
/run-kafka-integration-tests

@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2021

Codecov Report

Merging #2069 (da7fc0a) into release-4.0 (753073a) will decrease coverage by 1.0862%.
The diff coverage is 57.5713%.

@@                 Coverage Diff                 @@
##           release-4.0      #2069        +/-   ##
===================================================
- Coverage      53.7661%   52.6799%   -1.0862%     
===================================================
  Files              153        165        +12     
  Lines            15958      17631      +1673     
===================================================
+ Hits              8580       9288       +708     
- Misses            6475       7365       +890     
- Partials           903        978        +75     

@3AceShowHand
Copy link
Contributor

/run-all-tests

@3AceShowHand
Copy link
Contributor

/run-all-tests

@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • overvenus

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 9, 2021
@amyangfei
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member Author

This pull request has been accepted and is ready to merge.

Commit hash: ec0c9de

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 9, 2021
@3AceShowHand
Copy link
Contributor

/run-unit-tests
/run-leak-tests
/run-kafka-tests

@ti-chi-bot ti-chi-bot merged commit 14965f6 into pingcap:release-4.0 Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants