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: Reduce unnecessary goroutines during search #32703
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: bigsheeper <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bigsheeper The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: bigsheeper <[email protected]>
@bigsheeper ut workflow job failed, comment |
Signed-off-by: bigsheeper <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #32703 +/- ##
==========================================
- Coverage 81.77% 81.74% -0.03%
==========================================
Files 1001 1002 +1
Lines 125359 125435 +76
==========================================
+ Hits 102517 102542 +25
- Misses 18956 18997 +41
- Partials 3886 3896 +10
|
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's recommended to leave SQPool
usage in segment to make sure all search/query operations using cgo pool in case of future misuse out side
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.
you mean that I should create a new pool for this, right?
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.
nope. I suggested that the SQPool
usage shall remain in segment.Search/Query method. search/queryOnSegment shall using a simple for-loop is good enough
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.
got it, make sense
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.
With the solution of keeping SQPool usage within the segment, we need to return the future
objects to the out side scope. However, when I attempted to make this modification, the code became more convoluted and monitoring metric was disrupted. Taking all this into consideration, I would suggest keeping with the current approach.
BTW, the SQPool is already being used out side (in RetrieveByOffsets
).
@congqixia
…4-refine-search-conc
Signed-off-by: bigsheeper <[email protected]>
@bigsheeper E2e jenkins job failed, comment |
@bigsheeper ut workflow job failed, comment |
…4-refine-search-conc
Signed-off-by: bigsheeper <[email protected]>
Since SQ thread pool is present in
cgo.Search
, allocating goroutines at the segments level for concurrency is unnecessary. Simply use the thread pool directly at the segments level to avoid extra goroutines.issue: #27456