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

Refine some comments about learner read #4784

Merged
merged 9 commits into from
May 7, 2022

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Apr 27, 2022

Signed-off-by: JaySon-Huang jayson.hjs@gmail.com

What problem does this PR solve?

Issue Number: ref #4118

Problem Summary: During refactoring, we may change some behavior unexpectedly #4674. Add some comments about learner read to explain why those steps are important.

What is changed and how it works?

  • Add comments about the order of learner read and table structure lock
  • Make some member vars to be local vars, avoid too much internal state changing for DAGStorageInterpreter

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 Apr 27, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • SeaRise
  • windtalker

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 the release-note-none Denotes a PR that doesn't merit a release note. label Apr 27, 2022
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 27, 2022
@JaySon-Huang
Copy link
Contributor Author

JaySon-Huang commented Apr 27, 2022

/hold
pending for #4783 to be merged first

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 27, 2022
@fuzhe1989
Copy link
Contributor

/hold pending for #4784 to be merged first

but this pr itself is #4784.

@JaySon-Huang
Copy link
Contributor Author

/hold pending for #4784 to be merged first

but this pr itself is #4784.

Oh, my mistake. It should be pending for 4783.
Fixed

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 29, 2022
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 5, 2022
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@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 May 5, 2022
@@ -30,6 +30,7 @@
#endif

#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to fix compile error under MacOS with Apple clang version 13.0.0

@JaySon-Huang
Copy link
Contributor Author

/rebuild

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented May 6, 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                                422                92    78.20%           6                 0   100.00%          56                 8    85.71%         140                59    57.86%
Flash/Coprocessor/DAGStorageInterpreter.cpp         418               418     0.00%          32                32     0.00%         863               863     0.00%         280               280     0.00%
Flash/Coprocessor/TiDBTableScan.h                     6                 6     0.00%           6                 6     0.00%          18                18     0.00%           0                 0         -
Functions/GeoUtils.h                                146               146     0.00%          34                34     0.00%         349               349     0.00%         110               110     0.00%
Storages/Transaction/LearnerRead.h                    6                 6     0.00%           2                 2     0.00%           2                 2     0.00%           6                 6     0.00%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                               998               668    33.07%          80                74     7.50%        1288              1240     3.73%         536               455    15.11%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18076      10153            43.83%    200506  101030       49.61%

full coverage report (for internal network access only)

@JaySon-Huang
Copy link
Contributor Author

@SeaRise @windtalker @ywqzzy PTAL again

@SeaRise SeaRise requested a review from ywqzzy May 6, 2022 02:24
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>
Copy link
Contributor

@SeaRise SeaRise left a comment

Choose a reason for hiding this comment

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

other lgtm

dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp Outdated Show resolved Hide resolved
Co-authored-by: SeaRise <hhssearise@foxmail.com>
@JaySon-Huang
Copy link
Contributor Author

/rebuild

Copy link
Contributor

@windtalker windtalker 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 May 7, 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: 1eae738

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

sre-bot commented May 7, 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                                422                92    78.20%           6                 0   100.00%          56                 8    85.71%         140                59    57.86%
Flash/Coprocessor/DAGStorageInterpreter.cpp         418               418     0.00%          32                32     0.00%         865               865     0.00%         280               280     0.00%
Flash/Coprocessor/TiDBTableScan.h                     6                 6     0.00%           6                 6     0.00%          18                18     0.00%           0                 0         -
Functions/GeoUtils.h                                146               146     0.00%          34                34     0.00%         349               349     0.00%         110               110     0.00%
Storages/Transaction/LearnerRead.h                    6                 6     0.00%           2                 2     0.00%           2                 2     0.00%           6                 6     0.00%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                               998               668    33.07%          80                74     7.50%        1290              1242     3.72%         536               455    15.11%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18088      10149            43.89%    200824  100956       49.73%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented May 7, 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                                422                92    78.20%           6                 0   100.00%          56                 8    85.71%         140                59    57.86%
Flash/Coprocessor/DAGStorageInterpreter.cpp         418               418     0.00%          32                32     0.00%         865               865     0.00%         280               280     0.00%
Flash/Coprocessor/TiDBTableScan.h                     6                 6     0.00%           6                 6     0.00%          18                18     0.00%           0                 0         -
Functions/GeoUtils.h                                146               146     0.00%          34                34     0.00%         349               349     0.00%         110               110     0.00%
Storages/Transaction/LearnerRead.h                    6                 6     0.00%           2                 2     0.00%           2                 2     0.00%           6                 6     0.00%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                               998               668    33.07%          80                74     7.50%        1290              1242     3.72%         536               455    15.11%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18090      10150            43.89%    200870  100964       49.74%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 5d461ab into pingcap:master May 7, 2022
@JaySon-Huang JaySon-Huang deleted the add_learner_read_comment branch May 7, 2022 05:01
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.

6 participants