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

TestUtils: read all blocks and sort them by handle before comparison. #5745

Merged
merged 6 commits into from
Sep 1, 2022

Conversation

JinheLin
Copy link
Contributor

@JinheLin JinheLin commented Aug 31, 2022

What problem does this PR solve?

Issue Number: ref #5689

Problem Summary:
Blocks can be unordered when read-thread-pool enabled if there are more than one segments.

To simplify testing, read all blocks and sort them by handle column before comparison.

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

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 31, 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 31, 2022
@JinheLin
Copy link
Contributor Author

/run-all-tests

@JinheLin JinheLin marked this pull request as draft August 31, 2022 09:13
@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 31, 2022
@JinheLin
Copy link
Contributor Author

/run-all-tests

@JinheLin
Copy link
Contributor Author

/run-all-tests

@JinheLin
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 1, 2022
@JinheLin
Copy link
Contributor Author

JinheLin commented Sep 1, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18490      8322             54.99%    213946  85911        59.84%

full coverage report (for internal network access only)

@JinheLin
Copy link
Contributor Author

JinheLin commented Sep 1, 2022

/run-unit-test

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18490      8324             54.98%    213946  85934        59.83%

full coverage report (for internal network access only)

@JinheLin JinheLin marked this pull request as ready for review September 1, 2022 05:54
@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 Sep 1, 2022
@JinheLin
Copy link
Contributor Author

JinheLin commented Sep 1, 2022

/run-unit-test

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18490      8321             55.00%    213946  85887        59.86%

full coverage report (for internal network access only)

@JinheLin
Copy link
Contributor Author

JinheLin commented Sep 1, 2022

/run-all-tests

@Lloyd-Pottiger
Copy link
Contributor

/cc @ywqzzy
maybe you are more familiar with the code.

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18490      8321             55.00%    213946  85886        59.86%

full coverage report (for internal network access only)

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 Sep 1, 2022
Co-authored-by: yanweiqi <592838129@qq.com>
Co-authored-by: yanweiqi <592838129@qq.com>
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.

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 Sep 1, 2022
@JinheLin
Copy link
Contributor Author

JinheLin commented Sep 1, 2022

/merge

@ti-chi-bot
Copy link
Member

@JinheLin: 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: db82f7e

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

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18569      8331             55.13%    214531  85831        59.99%

full coverage report (for internal network access only)

@ti-chi-bot
Copy link
Member

@JinheLin: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

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.

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 1, 2022

Coverage for changed files

Filename                                                     Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Storages/DeltaMerge/tests/gtest_dm_delta_merge_store.cpp         863               314    63.62%          62                 1    98.39%        2726                69    97.47%         246               168    31.71%
TestUtils/InputStreamTestUtils.cpp                               173                27    84.39%           7                 0   100.00%         375               115    69.33%          94                30    68.09%

Files which contain no functions:
TestUtils/InputStreamTestUtils.h                                   0                 0         -           0                 0         -           0                 0         -           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                           1036               341    67.08%          69                 1    98.55%        3101               184    94.07%         340               198    41.76%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18569      8333             55.12%    214531  85847        59.98%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 5859c3d into pingcap:master Sep 1, 2022
@JinheLin JinheLin deleted the fix_test_utils branch March 27, 2023 08:18
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/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.

7 participants