-
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: Use pool to limit kafka cgo thread number #37744
enhance: Use pool to limit kafka cgo thread number #37744
Conversation
Related to milvus-io#37665 Thread number went rocket high when there is lots of kafka consumers on datanode. Since the internal implementation is CGO, using which directly will make cgo thread leaked. This PR add a worker pool for kafka API utilzing CGO calls to limit thread number. Signed-off-by: Congqi Xia <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: congqixia 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 |
@congqixia cpp-unit-test check failed, comment |
rerun cpp-unit-test |
1 similar comment
rerun cpp-unit-test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #37744 +/- ##
===========================================
+ Coverage 68.91% 80.68% +11.77%
===========================================
Files 290 1357 +1067
Lines 25471 190741 +165270
===========================================
+ Hits 17553 153902 +136349
- Misses 7918 31407 +23489
- Partials 0 5432 +5432
|
/lgtm |
Introduced by milvus-io#37744 Signed-off-by: Congqi Xia <[email protected]>
Introduced by #37744 Signed-off-by: Congqi Xia <[email protected]>
…#37744)" This reverts commit 3743fc2 Signed-off-by: jaime <[email protected]>
In scenarios with many vchannels, the pool limit may cause requests to wait or timeout. |
Revert "fix: Move init kafka pool into once (milvus-io#37786)" Revert "enhance: Use pool to limit kafka cgo thread number (milvus-io#37744)" Signed-off-by: jaime <[email protected]>
issue: #38263 Revert "fix: Move init kafka pool into once (#37786)" Revert "enhance: Use pool to limit kafka cgo thread number (#37744)" Signed-off-by: jaime <[email protected]>
Related to #37665
Thread number went rocket high when there is lots of kafka consumers on datanode. Since the internal implementation is CGO, using which directly will make cgo thread leaked.
This PR add a worker pool for kafka API utilzing CGO calls to limit thread number.