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

enhance: Use pool to limit kafka cgo thread number #37744

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

congqixia
Copy link
Contributor

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.

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]>
@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Nov 16, 2024
@sre-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Nov 16, 2024
Copy link
Contributor

mergify bot commented Nov 16, 2024

@congqixia cpp-unit-test check failed, comment rerun cpp-unit-test can trigger the job again.

@congqixia
Copy link
Contributor Author

rerun cpp-unit-test

1 similar comment
@congqixia
Copy link
Contributor Author

rerun cpp-unit-test

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.68%. Comparing base (00edec2) to head (bf271c7).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             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     
Components Coverage Δ
Client 61.25% <ø> (∅)
Core 68.91% <ø> (ø)
Go 83.20% <ø> (∅)

see 1067 files with indirect coverage changes

@mergify mergify bot added the ci-passed label Nov 16, 2024
@bigsheeper
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit 3743fc2 into milvus-io:master Nov 18, 2024
20 checks passed
congqixia added a commit to congqixia/milvus that referenced this pull request Nov 18, 2024
czs007 pushed a commit that referenced this pull request Nov 18, 2024
jaime0815 added a commit to jaime0815/milvus that referenced this pull request Dec 5, 2024
@jaime0815
Copy link
Contributor

In scenarios with many vchannels, the pool limit may cause requests to wait or timeout.

jaime0815 added a commit to jaime0815/milvus that referenced this pull request Dec 6, 2024
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]>
sre-ci-robot pushed a commit that referenced this pull request Dec 6, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants