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

Fix fail to create three hops of ref pages (#5612) #5674

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #5612

What problem does this PR solve?

Issue Number: close #5570

Problem Summary: As described in #5570 (comment)

What is changed and how it works?

In VersionedPageEntries::incrRefCount and VersionedPageEntries::resolveToPageId (with ignore_deletes=true), we ignore deletes before ver until we find an entry.
This is base on the assumption that we won't reuse the same page id before we cleanup all the ref to a page in the upper layer.

tests:

  • add segment logical split random test SegmentOperationTest.SegmentLogicalSplit
  • add ref page random test PageDirectoryTest.{NewRefAfterDelRandom,NewRefToExtAfterDelRandom}

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 Author

ti-chi-bot commented Aug 22, 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 do-not-merge/cherry-pick-not-approved 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. type/cherry-pick-for-release-6.1 This PR is cherry-picked to release-6.1 from a source PR. labels Aug 22, 2022
@VelocityLight VelocityLight added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Aug 22, 2022
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@JaySon-Huang
Copy link
Contributor

/run-all-tests

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

/run-all-tests

Signed-off-by: JaySon-Huang <[email protected]>
@JaySon-Huang JaySon-Huang force-pushed the cherry-pick-5612-to-release-6.1 branch from d22a4a9 to b458c26 Compare August 22, 2022 13:03
@JaySon-Huang
Copy link
Contributor

/run-all-tests

Signed-off-by: JaySon-Huang <[email protected]>
@JaySon-Huang
Copy link
Contributor

/run-all-tests

@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 Aug 22, 2022
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member Author

@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 Author

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

Commit hash: f6f4a4c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 22, 2022
Signed-off-by: JaySon-Huang <[email protected]>
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Aug 22, 2022
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member Author

@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 Author

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

Commit hash: af9dfac

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

sre-bot commented Aug 22, 2022

Coverage for changed files

Filename                                                   Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/FailPoint.cpp                                           464                99    78.66%           6                 0   100.00%          56                 8    85.71%         154                62    59.74%
Flash/Management/tests/gtest_manual_compact.cpp                154                78    49.35%          16                 0   100.00%         246                 4    98.37%          54                45    16.67%
Storages/DeltaMerge/Segment.cpp                                711               130    81.72%          47                 1    97.87%        1173               124    89.43%         374               156    58.29%
Storages/DeltaMerge/StoragePool.cpp                            224               108    51.79%          31                 8    74.19%         480               210    56.25%         146                85    41.78%
Storages/DeltaMerge/StoragePool.h                               11                 1    90.91%          11                 1    90.91%          31                 9    70.97%           0                 0         -
Storages/DeltaMerge/tests/gtest_segment.cpp                    169                73    56.80%          11                 1    90.91%         186                18    90.32%          60                43    28.33%
Storages/DeltaMerge/tests/gtest_segment_test_basic.cpp         277                65    76.53%          28                 4    85.71%         437               143    67.28%         116                48    58.62%
Storages/DeltaMerge/tests/gtest_segment_test_basic.h             9                 0   100.00%           9                 0   100.00%          11                 0   100.00%           0                 0         -
Storages/Page/V3/PageDirectory.cpp                             591                84    85.79%          32                 1    96.88%        1179               173    85.33%         462               102    77.92%
Storages/Page/V3/PageDirectory.h                                25                 3    88.00%          25                 3    88.00%         104                10    90.38%           0                 0         -
Storages/Page/V3/tests/gtest_page_directory.cpp               1285               276    78.52%          62                 0   100.00%        2104                 7    99.67%         250               160    36.00%
Storages/Page/V3/tests/gtest_page_storage_mix_mode.cpp         331                86    74.02%          16                 0   100.00%         583                21    96.40%          74                53    28.38%
Storages/StorageDeltaMerge.cpp                                 679               328    51.69%          58                26    55.17%        1307               725    44.53%         378               243    35.71%
Storages/tests/TiFlashStorageTestBasic.h                        35                 7    80.00%           7                 0   100.00%          67                19    71.64%          22                10    54.55%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                         4965              1338    73.05%         359                45    87.47%        7964              1471    81.53%        2090              1007    51.82%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18345      9785             46.66%    206098  98001        52.45%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit dd8e5fa into pingcap:release-6.1 Aug 22, 2022
@jayl1e jayl1e added this to the v6.1.1 milestone Aug 23, 2022
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. 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. type/cherry-pick-for-release-6.1 This PR is cherry-picked to release-6.1 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants