milvus
milvus copied to clipboard
fix: Prevent deadlock in runComponent when Prepare fails
issue: #45068 When component.Prepare() fails (e.g., net listener creation error), the sign channel was never closed, causing runComponent to block indefinitely at <-sign. This resulted in the entire process hanging after logging the error message.
Changes:
- Move close(sign) to defer statement in runComponent goroutine
- Ensures sign channel is always closed regardless of success/failure
- Allows proper error propagation through future.Await() mechanism
[ci-v2-notice] Notice: We are gradually rolling out the new ci-v2 system.
- Legacy CI jobs remain unaffected, you can just ignore ci-v2 if you don't want to run it.
- Additional "ci-v2/*" checkers will run for this PR to ensure the new ci-v2 system is working as expected.
- For tests that exist in both v1 and v2, passing in either system is considered PASS.
To rerun ci-v2 checks, comment with:
- /ci-rerun-code-check // for ci-v2/code-check
- /ci-rerun-build // for ci-v2/build
- /ci-rerun-ut-integration // for ci-v2/ut-integration
- /ci-rerun-ut-go // for ci-v2/ut-go
- /ci-rerun-ut-cpp // for ci-v2/ut-cpp
- /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp
- /ci-rerun-e2e-arm // for ci-v2/e2e-arm
If you have any questions or requests, please contact @zhikunyao.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 76.50%. Comparing base (1ba75ee) to head (939ab43).
:warning: Report is 4 commits behind head on master.
:x: Your project status has failed because the head coverage (76.50%) is below the target coverage (77.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files
@@ Coverage Diff @@
## master #45609 +/- ##
==========================================
+ Coverage 76.47% 76.50% +0.02%
==========================================
Files 1863 1875 +12
Lines 290163 292052 +1889
==========================================
+ Hits 221889 223420 +1531
- Misses 60923 61226 +303
- Partials 7351 7406 +55
| Components | Coverage Δ | |
|---|---|---|
| Client | 78.17% <ø> (ø) |
|
| Core | 83.18% <ø> (ø) |
|
| Go | 74.61% <ø> (+0.01%) |
:arrow_up: |
| see 42 files with indirect coverage changes |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/ci-rerun-ut-go
/ci-rerun-ut-go
/lgtm
/ci-rerun-ut-go
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: congqixia, weiliu1031
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~cmd/OWNERS~~ [congqixia]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment