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

remove big blob file type in ps v3 #5544

Merged
merged 21 commits into from
Aug 23, 2022

Conversation

lidezhu
Copy link
Contributor

@lidezhu lidezhu commented Aug 5, 2022

What problem does this PR solve?

Issue Number: close #5558

Problem Summary: We use a special type of BlobFile to handle write which is larger than BlobFile limit size which make the logic a little complicated.

What is changed and how it works?

  1. Remove big blob file;
  2. Add metrics for the distribution of write batch size:
    image

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 Aug 5, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang
  • flowbehappy

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 do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 5, 2022
@lidezhu lidezhu changed the title [WIP]: support config blob file limit size [WIP] support config blob file limit size Aug 5, 2022
@@ -43,9 +42,6 @@ SpaceMapPtr SpaceMap::createSpaceMap(SpaceMapType type, UInt64 start, UInt64 end
case SMAP64_STD_MAP:
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, can we remove RBTreeSpaceMap? I don't think it is ever useful.

Copy link
Contributor Author

@lidezhu lidezhu Aug 8, 2022

Choose a reason for hiding this comment

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

Yes, so should we remove it in another pr or in this pr?

@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from 651088c to c49b254 Compare August 8, 2022 07:18
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. do-not-merge/needs-linked-issue labels Aug 8, 2022
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch 3 times, most recently from 1553a85 to 5be02c3 Compare August 8, 2022 08:03
@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 8, 2022

/run-check-issue-triage-complete

@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 8, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Aug 8, 2022

Coverage for changed files

Filename                                            Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Interpreters/Settings.h                                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
Storages/Page/ConfigSettings.cpp                          6                 0   100.00%           2                 0   100.00%          20                 0   100.00%           4                 2    50.00%
Storages/Page/V3/BlobStore.cpp                          621               161    74.07%          54                 2    96.30%        1192               264    77.85%         330               100    69.70%
Storages/Page/V3/BlobStore.h                              9                 2    77.78%           9                 2    77.78%          39                21    46.15%           0                 0         -
Storages/Page/V3/spacemap/SpaceMap.cpp                   37                 4    89.19%           7                 0   100.00%          51                13    74.51%          22                 7    68.18%
Storages/Page/V3/spacemap/SpaceMap.h                      7                 2    71.43%           4                 1    75.00%          18                 5    72.22%           6                 1    83.33%
Storages/Page/V3/tests/gtest_blob_store.cpp             517                85    83.56%          29                 0   100.00%        1309                12    99.08%         180                52    71.11%
Storages/Page/V3/tests/gtest_page_directory.cpp        1172               245    79.10%          58                 0   100.00%        1859                 7    99.62%         174               140    19.54%
TestUtils/MockDiskDelegator.h                            39                 8    79.49%          20                 3    85.00%          83                14    83.13%          14                 5    64.29%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                  2409               507    78.95%         184                 8    95.65%        4572               336    92.65%         730               307    57.95%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
19005      9227             51.45%    215495  94015        56.37%

full coverage report (for internal network access only)

@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from 5be02c3 to 3f607fa Compare August 8, 2022 09:58
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from e1cfb17 to adc7b4c Compare August 11, 2022 10:02
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from b2680db to f55775a Compare August 11, 2022 10:26
@lidezhu lidezhu changed the title [WIP] support config blob file limit size remove big blob file in ps v3 Aug 11, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2022
@lidezhu lidezhu changed the title remove big blob file in ps v3 remove big blob file type in ps v3 Aug 11, 2022
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from 79d951b to b374c8e Compare August 23, 2022 07:26
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from b374c8e to 125bbe3 Compare August 23, 2022 07:36
@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 23, 2022

try to add metric(wip)

need to show the metrics in the grafana panel

Added. PTAL.

@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 23, 2022

/run-all-tests

metrics/grafana/tiflash_summary.json Outdated Show resolved Hide resolved
dbms/src/Common/TiFlashMetrics.h Outdated Show resolved Hide resolved
@lidezhu lidezhu force-pushed the support-config-blob-file-limit-size branch from bf88d31 to cbb34ec Compare August 23, 2022 09:33
@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 23, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Aug 23, 2022

Coverage for changed files

Filename                                            Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/TiFlashMetrics.h                                  18                 0   100.00%          11                 0   100.00%          47                 1    97.87%           8                 0   100.00%
Interpreters/Settings.h                                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
Storages/Page/V3/BlobStore.cpp                          616               141    77.11%          53                 0   100.00%        1186               233    80.35%         322                92    71.43%
Storages/Page/V3/BlobStore.h                              9                 2    77.78%           9                 2    77.78%          39                21    46.15%           0                 0         -
Storages/Page/V3/spacemap/SpaceMap.cpp                   37                 4    89.19%           7                 0   100.00%          51                13    74.51%          22                 7    68.18%
Storages/Page/V3/spacemap/SpaceMap.h                      7                 2    71.43%           4                 1    75.00%          18                 5    72.22%           6                 1    83.33%
Storages/Page/V3/tests/gtest_blob_store.cpp             519                85    83.62%          29                 0   100.00%        1306                12    99.08%         180                52    71.11%
Storages/Page/V3/tests/gtest_page_directory.cpp        1289               274    78.74%          62                 0   100.00%        2104                 7    99.67%         246               158    35.77%
TestUtils/MockDiskDelegator.h                            39                 4    89.74%          20                 1    95.00%          83                 4    95.18%          14                 4    71.43%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                  2535               512    79.80%         196                 4    97.96%        4835               296    93.88%         798               314    60.65%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18401      8326             54.75%    212650  85900        59.60%

full coverage report (for internal network access only)

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.

Use interpolateSpectral and show the legend is better
image

metrics/grafana/tiflash_summary.json Outdated Show resolved Hide resolved
metrics/grafana/tiflash_summary.json Outdated Show resolved Hide resolved
lidezhu and others added 2 commits August 23, 2022 20:33
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: JaySon <tshent@qq.com>
@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 23, 2022

/merge

@ti-chi-bot
Copy link
Member

@lidezhu: 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: 4f81d68

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 23, 2022
@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 23, 2022

/run-unit-test

@sre-bot
Copy link
Collaborator

sre-bot commented Aug 23, 2022

Coverage for changed files

Filename                                            Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/TiFlashMetrics.h                                  18                 0   100.00%          11                 0   100.00%          47                 1    97.87%           8                 0   100.00%
Interpreters/Settings.h                                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
Storages/Page/V3/BlobStore.cpp                          616               141    77.11%          53                 0   100.00%        1186               233    80.35%         322                92    71.43%
Storages/Page/V3/BlobStore.h                              9                 2    77.78%           9                 2    77.78%          39                21    46.15%           0                 0         -
Storages/Page/V3/spacemap/SpaceMap.cpp                   37                 4    89.19%           7                 0   100.00%          51                13    74.51%          22                 7    68.18%
Storages/Page/V3/spacemap/SpaceMap.h                      7                 2    71.43%           4                 1    75.00%          18                 5    72.22%           6                 1    83.33%
Storages/Page/V3/tests/gtest_blob_store.cpp             519                85    83.62%          29                 0   100.00%        1306                12    99.08%         180                52    71.11%
Storages/Page/V3/tests/gtest_page_directory.cpp        1289               274    78.74%          62                 0   100.00%        2104                 7    99.67%         246               158    35.77%
TestUtils/MockDiskDelegator.h                            39                 4    89.74%          20                 1    95.00%          83                 4    95.18%          14                 4    71.43%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                  2535               512    79.80%         196                 4    97.96%        4835               296    93.88%         798               314    60.65%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18402      8327             54.75%    212697  85990        59.57%

full coverage report (for internal network access only)

@lidezhu lidezhu merged commit c9656c9 into pingcap:master Aug 23, 2022
@lidezhu lidezhu deleted the support-config-blob-file-limit-size branch August 23, 2022 13:32
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.

Support decreasing the file limit size of BlobFile
5 participants