-
Notifications
You must be signed in to change notification settings - Fork 3k
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
enhance: Remove mutex from SegmentManger in querynode #39051
enhance: Remove mutex from SegmentManger in querynode #39051
Conversation
@bigsheeper E2e jenkins job failed, comment |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #39051 +/- ##
===========================================
+ Coverage 69.71% 81.14% +11.43%
===========================================
Files 299 1404 +1105
Lines 26768 197678 +170910
===========================================
+ Hits 18661 160408 +141747
- Misses 8107 31638 +23531
- Partials 0 5632 +5632
|
Signed-off-by: bigsheeper <[email protected]>
cef1cef
to
643451d
Compare
@bigsheeper E2e jenkins job failed, comment |
@bigsheeper go-sdk check failed, comment |
…2-remove-segment-manager-mu
…2-remove-segment-manager-mu
Signed-off-by: bigsheeper <[email protected]>
@bigsheeper E2e jenkins job failed, comment |
…2-remove-segment-manager-mu
Signed-off-by: bigsheeper <[email protected]>
@@ -313,58 +315,57 @@ func (segments segments) RangeWithFilter(criterion *segmentCriterion, process fu | |||
return | |||
} | |||
|
|||
var candidates []map[int64]Segment | |||
var candidates []*typeutil.ConcurrentMap[typeutil.UniqueID, Segment] |
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 we need concurrentMap here since its scope is just this function
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.
Since candidates
are directly constructed from growingSegments
and sealedSegments
, which are of the ConcurrentMap
type, using a regular map for candidates
would require a copy operation, making it inefficient.
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.
Actually it is shallow copy so not that heavy. But I don't think it is something have to be done.
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bigsheeper, liliu-z 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 |
Remove mutex from SegmentManger in querynode to prevent mutex contention. issue: milvus-io#37630 --------- Signed-off-by: bigsheeper <[email protected]>
…39282) Remove mutex from SegmentManger in querynode to prevent mutex contention. issue: #37630 pr: #39051 Signed-off-by: bigsheeper <[email protected]>
Remove mutex from SegmentManger in querynode to prevent mutex contention. issue: milvus-io#37630 --------- Signed-off-by: bigsheeper <[email protected]>
Remove mutex from SegmentManger in querynode to prevent mutex contention.
issue: #37630