-
Notifications
You must be signed in to change notification settings - Fork 721
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
*: reduce raft cluster lock and replace some place with atomic #8786
Conversation
Signed-off-by: lhy1024 <[email protected]>
} | ||
|
||
// GetStoreMinResolvedTS returns the min resolved ts of the store. | ||
func (c *RaftCluster) GetStoreMinResolvedTS(storeID uint64) uint64 { | ||
c.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not necessary
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8786 +/- ##
==========================================
- Coverage 75.21% 75.20% -0.01%
==========================================
Files 459 459
Lines 71843 71835 -8
==========================================
- Hits 54035 54022 -13
- Misses 14351 14366 +15
+ Partials 3457 3447 -10
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: lhy1024 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use atomic.Value?
Sure, at first I thought it was possible that we'd need to manually lock and unlock to control more of the code, but now it seems that atomic is sufficient for these three places |
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JmPotato, okJiang 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:
Approvers can indicate their approval by writing |
/test pull-integration-realcluster-test |
What problem does this PR solve?
Issue Number: Close #8785
What is changed and how does it work?
Check List
Tests
Release note