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

Support multi-disks for latest data #1156,#1199,#1216 #1159

Merged
merged 4 commits into from
Nov 15, 2020

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Oct 19, 2020

cherry-pick of #1156, #1199, #1216


What problem does this PR solve?

Issue Number: close #1128

Problem Summary: Currently, we can only use one path to store a PageStorage. It causes much more IO pressure(from Delta and Region snapshots) for the first disk than other disks when TiFlash is deployed in multi-paths mode. And support multi-paths for PageStorage can distribute the IO pressures between all disks.

Note
This PR only replace PageStorage used by the DT engine.
It doesn't replace the PageStorage which is used for storing Region Info. Will file another PR to do this.

What is changed and how it works?

Design doc:https://docs.google.com/document/d/1281wqqWNVj6LZMiWfcBPPQLOQN7w3koODPVLYWM6E68/edit#

  • Refactor class PathPool
    • PathPool: Only store the main_data_paths and latest_data_paths. Generate StoragePathPool for each storage
    • StoragePathPool: A class to manage paths for the specified storage
    • *-Delegator: Some delegator generated by StoragePathPool. They are used for managing the path for storing stable/delta/raft data
  • Refactor PageStorage and StorageDeltaMerge to adapt to new PathPool
  • The configuration "capacity" only accepts one quota instead of one quota for each path. The capacity quota limits the capacity size report to PD. See class PathCapacityMetrics for more details

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch 4.0

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM
  • Breaking backward compatibility

Release note

  • Support multi-disks for storing latest data

@JaySon-Huang JaySon-Huang added type/enhancement The issue or PR belongs to an enhancement. CHERRY-PICK cherry pick labels Oct 19, 2020
@JaySon-Huang JaySon-Huang added this to the v4.0.8 milestone Oct 19, 2020
@JaySon-Huang JaySon-Huang self-assigned this Oct 19, 2020
@JaySon-Huang JaySon-Huang modified the milestones: v4.0.8, v4.0.9 Oct 22, 2020
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang JaySon-Huang changed the title Support multi-paths for PageStorage #1156 [WIP] Support multi-paths for PageStorage #1156 Oct 23, 2020
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

1 similar comment
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang JaySon-Huang changed the title [WIP] Support multi-paths for PageStorage #1156 Support multi-paths for PageStorage #1156 Oct 27, 2020
@JaySon-Huang JaySon-Huang added type/new-feature Issue or PR for new feature and removed type/enhancement The issue or PR belongs to an enhancement. labels Oct 27, 2020
@JaySon-Huang JaySon-Huang changed the title Support multi-paths for PageStorage #1156 Support multi-disks for PageStorage #1156 Nov 3, 2020
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@flowbehappy flowbehappy self-requested a review November 6, 2020 06:07
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 6, 2020
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang JaySon-Huang changed the title Support multi-disks for PageStorage #1156 Support multi-disks for latest data #1156 Nov 15, 2020
@JaySon-Huang JaySon-Huang changed the title Support multi-disks for latest data #1156 Support multi-disks for latest data #1156,#1199,#1216 Nov 15, 2020
@JaySon-Huang JaySon-Huang merged commit 21b63b6 into pingcap:release-4.0 Nov 15, 2020
@JaySon-Huang JaySon-Huang deleted the refactor_path_pool_4.0 branch December 5, 2020 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHERRY-PICK cherry pick status/LGT1 Indicates that a PR has LGTM 1. type/new-feature Issue or PR for new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants