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

BlobStore support multipath. #3938

Merged
merged 32 commits into from
Mar 29, 2022
Merged

BlobStore support multipath. #3938

merged 32 commits into from
Mar 29, 2022

Conversation

jiaqizho
Copy link
Contributor

@jiaqizho jiaqizho commented Jan 24, 2022

What problem does this PR solve?

Issue Number: ref #3594

Problem Summary:

What is changed and how it works?

  • support multipath in blobstore.

I'm not sure if multipath needs to be supported in this way. What I mean is that the upper layer may change the table storage or DT may combine log/meta/data into single PageStorage.

But if we still do multipathing in the old way, this PR is fine. Just need to wait for #3908 merged and change some details of this PR.

Check List

Tests

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

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 24, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang
  • lidezhu

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 release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 24, 2022
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 21, 2022
Signed-off-by: jiaqizho <[email protected]>
@jiaqizho jiaqizho changed the title [DNM]BlobStore support multipath. BlobStore support multipath. Feb 21, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 22, 2022
@jiaqizho jiaqizho requested a review from lidezhu March 23, 2022 03:24
@jiaqizho
Copy link
Contributor Author

@JaySon-Huang @lidezhu PTAL

Signed-off-by: jiaqizho <[email protected]>
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2022
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

some small comments

dbms/src/Storages/Page/V3/BlobStore.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/Page/V3/BlobFile.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

dbms/src/Storages/PathPool.cpp Outdated Show resolved Hide resolved
dbms/src/Storages/PathPool.cpp Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 29, 2022
@jiaqizho jiaqizho requested a review from lidezhu March 29, 2022 08:00
Copy link
Contributor

@lidezhu lidezhu left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Mar 29, 2022
@jiaqizho
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

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

Commit hash: 38eb316

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 29, 2022
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 29, 2022
@jiaqizho
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

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

Commit hash: 2cea4bb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 29, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 29, 2022

Coverage for changed files

Filename                                            Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/Page/V3/BlobFile.cpp                            29                10    65.52%           6                 1    83.33%          84                27    67.86%          16                 8    50.00%
Storages/Page/V3/BlobFile.h                               2                 0   100.00%           2                 0   100.00%           6                 0   100.00%           0                 0         -
Storages/Page/V3/BlobStore.cpp                          374               113    69.79%          39                 3    92.31%         818               209    74.45%         240                90    62.50%
Storages/Page/V3/BlobStore.h                              7                 1    85.71%           7                 1    85.71%          25                10    60.00%           0                 0         -
Storages/Page/V3/PageStorageImpl.cpp                     80                22    72.50%          21                 7    66.67%         194                62    68.04%          44                23    47.73%
Storages/Page/V3/tests/gtest_blob_store.cpp            3589               596    83.39%          17                 0   100.00%         694                 0   100.00%        1114               525    52.87%
Storages/Page/V3/tests/gtest_page_directory.cpp        8833              1575    82.17%          50                 0   100.00%        1635                 7    99.57%        2774              1405    49.35%
Storages/PathPool.cpp                                   370               144    61.08%          77                28    63.64%         744               250    66.40%         214               103    51.87%
Storages/PathPool.h                                      14                 3    78.57%          14                 3    78.57%          16                 3    81.25%           0                 0         -
Storages/tests/gtest_path_pool.cpp                     1371               208    84.83%          13                 0   100.00%         358                 9    97.49%         466               203    56.44%
TestUtils/MockDiskDelegator.h                            22                 6    72.73%          20                 5    75.00%          59                12    79.66%           2                 1    50.00%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                 14691              2678    81.77%         266                48    81.95%        4633               589    87.29%        4870              2358    51.58%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
17069      9587             43.83%    192089  97178        49.41%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit e49339b into pingcap:master Mar 29, 2022
@lidezhu
Copy link
Contributor

lidezhu commented Mar 31, 2022

It seems we need to pass parent_path instead of path when call functions like addPageFileUsedSize in PageStorage V3, otherwise it's hard to make PSDiskDelegatorRaft compatible for both V2 and V3. @jiaqizho /cc @JaySon-Huang

@JaySon-Huang
Copy link
Contributor

Yes, I found this bug and fix it in my branch

@JaySon-Huang
Copy link
Contributor

JaySon-Huang commented Mar 31, 2022

It seems we need to pass parent_path instead of path when call functions like addPageFileUsedSize in PageStorage V3, otherwise it's hard to make PSDiskDelegatorRaft compatible for both V2 and V3.

will be fixed in #4540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants