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

storage: require lock for segment operations #5894

Merged
merged 3 commits into from
Sep 15, 2022

Conversation

breezewish
Copy link
Member

Signed-off-by: Wish [email protected]

What problem does this PR solve?

Issue Number: ref #5237

What is changed and how it works?

Add (unused) lock in the function signature to avoid forgetting.

Check List

Tests

  • Unit test: Existing tests are sufficient.
  • 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 Sep 15, 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 Sep 15, 2022
@breezewish
Copy link
Member Author

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 15, 2022

Coverage for changed files

Filename                                Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DeltaMergeStore.h                            42                13    69.05%          19                 3    84.21%         109                31    71.56%          44                10    77.27%
DeltaMergeStore_InternalSegment.cpp         416               206    50.48%           4                 0   100.00%         335                81    75.82%         112                57    49.11%
Segment.cpp                                1053               264    74.93%          52                 1    98.08%        1262               124    90.17%         328               109    66.77%
Segment.h                                    40                 5    87.50%          25                 4    84.00%          34                 5    85.29%           4                 2    50.00%
tests/gtest_dm_segment.cpp                  402               131    67.41%          36                 0   100.00%        1134                 6    99.47%         164                77    53.05%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1953               619    68.31%         136                 8    94.12%        2874               247    91.41%         652               255    60.89%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18746      8124             56.66%    217123  83547        61.52%

full coverage report (for internal network access only)

@breezewish breezewish requested a review from lidezhu September 15, 2022 04:09
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 15, 2022
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 15, 2022
@JaySon-Huang
Copy link
Contributor

/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: dc4bbd2

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

@breezewish: 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.

@JaySon-Huang
Copy link
Contributor

/rebuild

@sre-bot
Copy link
Collaborator

sre-bot commented Sep 15, 2022

Coverage for changed files

Filename                                Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DeltaMergeStore.h                            42                13    69.05%          19                 3    84.21%         109                31    71.56%          44                10    77.27%
DeltaMergeStore_InternalSegment.cpp         416               206    50.48%           4                 0   100.00%         335                81    75.82%         112                57    49.11%
Segment.cpp                                1053               264    74.93%          52                 1    98.08%        1262               124    90.17%         328               109    66.77%
Segment.h                                    40                 5    87.50%          25                 4    84.00%          34                 5    85.29%           4                 2    50.00%
tests/gtest_dm_segment.cpp                  402               131    67.41%          36                 0   100.00%        1134                 6    99.47%         164                77    53.05%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1953               619    68.31%         136                 8    94.12%        2874               247    91.41%         652               255    60.89%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
18752      8130             56.64%    217210  83500        61.56%

full coverage report (for internal network access only)

@breezewish
Copy link
Member Author

/run-integration-test

@ti-chi-bot ti-chi-bot merged commit 0d0cde5 into master Sep 15, 2022
@breezewish breezewish deleted the wenxuan/segment_apply_lock branch September 15, 2022 06:19
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/M Denotes a PR that changes 30-99 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.

5 participants