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

PageStorage: Fix entry.tag after full gc && add more debug message #5094

Merged
merged 5 commits into from
Jun 9, 2022

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Jun 9, 2022

What problem does this PR solve?

Issue Number: close #5093, ref #5076

Problem Summary: The entry.tag is incorrect after full gc, this will lead to more IO caused by RegionPersister::doPersist

if (page_reader)
{
auto entry = page_reader->getPageEntry(region_id);
if (entry.isValid() && entry.tag > applied_index)
return;

What is changed and how it works?

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

Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 9, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • hehechen
  • jiaqizho

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. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 9, 2022
@JaySon-Huang JaySon-Huang self-assigned this Jun 9, 2022
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 9, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DeltaMerge/DeltaMergeStore.cpp              1453               537    63.04%          67                 7    89.55%        2042               518    74.63%         840               403    52.02%
Page/PageUtil.h                              100                16    84.00%           8                 0   100.00%         147                16    89.12%          64                20    68.75%
Page/V2/tests/gtest_page_util.cpp            104                42    59.62%           3                 0   100.00%          54                 4    92.59%          26                12    53.85%
Page/V3/BlobStore.cpp                        588               156    73.47%          54                 2    96.30%        1175               260    77.87%         370               136    63.24%
Page/V3/BlobStore.h                           12                 2    83.33%          10                 2    80.00%          50                23    54.00%           2                 0   100.00%
Page/V3/tests/gtest_blob_store.cpp          5488              1185    78.41%          27                 1    96.30%        1172                66    94.37%        1698               849    50.00%
Page/V3/tests/gtest_page_storage.cpp        3860              1327    65.62%          47                 7    85.11%        1161               154    86.74%        1216               684    43.75%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      11605              3265    71.87%         216                19    91.20%        5801              1041    82.05%        4216              2104    50.09%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18328      9657             47.31%    205672  96715        52.98%

full coverage report (for internal network access only)

Copy link
Contributor

@jiaqizho jiaqizho 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 the status/LGT1 Indicates that a PR has LGTM 1. label Jun 9, 2022
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 9, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DeltaMerge/DeltaMergeStore.cpp              1453               536    63.11%          67                 7    89.55%        2042               518    74.63%         840               402    52.14%
Page/PageUtil.h                              100                16    84.00%           8                 0   100.00%         147                16    89.12%          64                20    68.75%
Page/V2/tests/gtest_page_util.cpp            104                42    59.62%           3                 0   100.00%          54                 4    92.59%          26                12    53.85%
Page/V3/BlobStore.cpp                        588               156    73.47%          54                 2    96.30%        1175               260    77.87%         370               136    63.24%
Page/V3/BlobStore.h                           12                 2    83.33%          10                 2    80.00%          50                23    54.00%           2                 0   100.00%
Page/V3/tests/gtest_blob_store.cpp          5488              1185    78.41%          27                 1    96.30%        1175                66    94.38%        1698               849    50.00%
Page/V3/tests/gtest_page_storage.cpp        3860              1327    65.62%          47                 7    85.11%        1161               154    86.74%        1216               684    43.75%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      11605              3264    71.87%         216                19    91.20%        5804              1041    82.06%        4216              2103    50.12%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18328      9657             47.31%    205678  96722        52.97%

full coverage report (for internal network access only)

@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 Jun 9, 2022
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: 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: 1ad6a6b

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

sre-bot commented Jun 9, 2022

Coverage for changed files

Filename                                 Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DeltaMerge/DeltaMergeStore.cpp              1453               536    63.11%          67                 7    89.55%        2042               518    74.63%         840               402    52.14%
Page/PageUtil.h                              100                16    84.00%           8                 0   100.00%         147                16    89.12%          64                20    68.75%
Page/V2/tests/gtest_page_util.cpp            104                42    59.62%           3                 0   100.00%          54                 4    92.59%          26                12    53.85%
Page/V3/BlobStore.cpp                        588               156    73.47%          54                 2    96.30%        1175               260    77.87%         370               136    63.24%
Page/V3/BlobStore.h                           12                 2    83.33%          10                 2    80.00%          50                23    54.00%           2                 0   100.00%
Page/V3/tests/gtest_blob_store.cpp          5488              1185    78.41%          27                 1    96.30%        1175                66    94.38%        1698               849    50.00%
Page/V3/tests/gtest_page_storage.cpp        3860              1327    65.62%          47                 7    85.11%        1161               154    86.74%        1216               684    43.75%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      11605              3264    71.87%         216                19    91.20%        5804              1041    82.06%        4216              2103    50.12%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18328      9657             47.31%    205678  96704        52.98%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit ba725cc into pingcap:master Jun 9, 2022
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Jun 9, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5096.

@JaySon-Huang JaySon-Huang deleted the debug_ps branch June 13, 2022 06:11
JaySon-Huang added a commit to ti-chi-bot/tiflash that referenced this pull request Aug 18, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. 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. 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.

The entry.tag is incorrect after full gc
5 participants