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

rc: fix group change will meet data race #8268

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jun 6, 2024

What problem does this PR solve?

Issue Number: Close #8267

What is changed and how does it work?

Because there is no happens-before guarantee for different goroutine, maybe meet memory reordering

Check List

Tests

  • No code(Cannot test it for memory ordering :( )

Release note

None.

Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp requested review from JmPotato and nolouch June 6, 2024 13:20
Copy link
Contributor

ti-chi-bot bot commented Jun 6, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024

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 release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 6, 2024
@@ -129,7 +129,9 @@ func (m *Manager) Init(ctx context.Context) error {
return err
}
// Load resource group meta info from storage.
m.Lock()
Copy link
Contributor

@lhy1024 lhy1024 Jun 6, 2024

Choose a reason for hiding this comment

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

Does it need to be picked to other branches?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.31%. Comparing base (e767c01) to head (b5a4f5c).

Current head b5a4f5c differs from pull request most recent head 0b7d0b9

Please upload reports for the commit 0b7d0b9 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8268      +/-   ##
==========================================
- Coverage   77.33%   77.31%   -0.03%     
==========================================
  Files         471      471              
  Lines       61381    61382       +1     
==========================================
- Hits        47472    47458      -14     
- Misses      10359    10371      +12     
- Partials     3550     3553       +3     
Flag Coverage Δ
unittests 77.31% <100.00%> (-0.03%) ⬇️

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

@HuSharp
Copy link
Member Author

HuSharp commented Jun 7, 2024

/test ?

Copy link
Contributor

ti-chi-bot bot commented Jun 7, 2024

@HuSharp: The following commands are available to trigger required jobs:

  • /test build

The following commands are available to trigger optional jobs:

  • /test pull-integration-copr-test
  • /test pull-integration-realcluster-test

Use /test all to run the following jobs that were automatically triggered:

  • tikv/pd/ghpr_build

In response to this:

/test ?

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 kubernetes/test-infra repository.

@HuSharp
Copy link
Member Author

HuSharp commented Jun 7, 2024

/test pull-integration-realcluster-test

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 11, 2024
m.groups = make(map[string]*ResourceGroup)
m.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Where will it be called concurrently?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think because there is no happens-before guarantee for different goroutines, maybe meet memory reordering.

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 11, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024, nolouch, rleungx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [lhy1024,nolouch,rleungx]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 11, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-11 02:54:23.602464837 +0000 UTC m=+433217.655776762: ☑️ agreed by rleungx.
  • 2024-06-11 05:12:32.111236822 +0000 UTC m=+441506.164548745: ☑️ agreed by nolouch.

@ti-chi-bot ti-chi-bot bot merged commit c015f14 into tikv:master Jun 11, 2024
16 checks passed
@HuSharp HuSharp deleted the fix_rc_data_race branch June 11, 2024 05:21
@HuSharp
Copy link
Member Author

HuSharp commented Jun 14, 2024

/run-cherry-picker

@HuSharp HuSharp added type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. type/cherry-pick-for-release-8.1 This PR is cherry-picked to release-8.1 from a source PR. labels Jun 17, 2024
@HuSharp
Copy link
Member Author

HuSharp commented Jun 17, 2024

/run-cherry-picker

@HuSharp HuSharp added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. and removed type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. type/cherry-pick-for-release-8.1 This PR is cherry-picked to release-8.1 from a source PR. labels Jun 17, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8292.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8293.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8294.

ti-chi-bot bot pushed a commit that referenced this pull request Jun 17, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jun 17, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. 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. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rc: group change will meet data race
5 participants