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

mcs: fix datarace in keyspace group #6722

Closed
wants to merge 1 commit into from
Closed

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 29, 2023

What problem does this PR solve?

Issue Number: Close #6721

What is changed and how does it work?

checkTSOMerge and checkTSOSplit will read from kgm.getKeyspaceGroupMeta

finishMergeKeyspaceGroup and finishSplitKeyspaceGroup will update kgm

so just return a copy to avoid data race

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 29, 2023

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 29, 2023
@lhy1024 lhy1024 requested review from binshi-bing and rleungx and removed request for binshi-bing June 29, 2023 12:26
@ti-chi-bot ti-chi-bot bot requested review from JmPotato and nolouch June 29, 2023 12:26
@lhy1024 lhy1024 requested review from binshi-bing and removed request for nolouch June 29, 2023 12:26
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 29, 2023
Signed-off-by: lhy1024 <admin@liudos.us>
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.06 ⚠️

Comparison is base (fa721e7) 74.57% compared to head (6c7c945) 74.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6722      +/-   ##
==========================================
- Coverage   74.57%   74.52%   -0.06%     
==========================================
  Files         416      416              
  Lines       43595    43599       +4     
==========================================
- Hits        32511    32492      -19     
- Misses       8193     8213      +20     
- Partials     2891     2894       +3     
Flag Coverage Δ
unittests 74.52% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/tso/keyspace_group_manager.go 79.52% <100.00%> (+0.12%) ⬆️

... and 37 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 30, 2023

It will be fix in #6723

@lhy1024 lhy1024 closed this Jun 30, 2023
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datarace in TestTSOKeyspaceGroupMerge
1 participant