fix: avoid redundant schema reopen locking in segcore#50378
Conversation
Related to milvus-io#50103 Cache the sealed segment schema version in an atomic and use it as a fast path before taking mutex_ during reopen. Double-check the version under the write lock before publishing schema changes so stale or duplicate reopen requests return early without contending on schema updates. Note: this patch is only a cheap fix for non-schema lock contention. the root shall be fixed after lock usage improvement Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
✅ CI Loop Results
|
| Stage | Result | Duration | Tests |
|---|---|---|---|
| ✅ Build | SUCCESS | 10.6min | - |
| ✅ Code-Check | SUCCESS | 4.8min | - |
| ✅ UT-GO | SUCCESS | 14.4min | 1012 passed |
| ✅ UT-Integration | SUCCESS | 24.0min | 46 passed |
| ✅ UT-CPP-Cov | SUCCESS | 48.6min | 7835 passed |
Total: 64min | Pipeline | Artifacts
Overall Coverage: 71.3%
Diff Coverage: CPP 83.3% (25 hit, 5 miss, 30 measurable lines, 18 unmeasured)
Diff Coverage HTML: view changed lines
Total Patch Coverage: 83.3% (25/30 measurable lines, 18 unmeasured)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #50378 +/- ##
==========================================
- Coverage 79.01% 78.96% -0.06%
==========================================
Files 2239 2239
Lines 396634 396645 +11
==========================================
- Hits 313391 313197 -194
- Misses 73703 73865 +162
- Partials 9540 9583 +43
🚀 New features to boost your workflow:
|
|
/ci-rerun-e2e-default |
Related to #50103
Cache the sealed segment schema version in an atomic and use it as a fast path before taking mutex_ during reopen. Double-check the version under the write lock before publishing schema changes so stale or duplicate reopen requests return early without contending on schema updates.
Note: this patch is only a cheap fix for non-schema lock contention. the root shall be fixed after lock usage improvement