enhance: use StorageVersion to identify v3 segments and fix stats task atomicity#48996
enhance: use StorageVersion to identify v3 segments and fix stats task atomicity#48996congqixia wants to merge 1 commit intomilvus-io:masterfrom
Conversation
|
[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. |
…k atomicity Related to milvus-io#48547 Replace ManifestPath != "" checks with StorageVersion-based checks across Go and C++ code to use the explicit version identifier instead of an indirect side-effect. This makes version gating clearer and decoupled from the manifest path value itself. Fix statsTask.SetJobInfo to apply manifest path and stats/bm25/text/json operators in a single atomic UpdateSegment call, eliminating a race window where manifest could be updated without stats (or vice versa). The previous code used separate UpdateSegment and UpdateSegmentsInfo calls that could partially fail. Also fix SetManifestPath SegmentOperator which had a self-comparison bug (segment.GetManifestPath() == segment.GetManifestPath()) causing it to always no-op. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
86ecde6 to
f9cb0ae
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #48996 +/- ##
===========================================
+ Coverage 77.97% 84.44% +6.46%
===========================================
Files 2167 642 -1525
Lines 356240 101207 -255033
===========================================
- Hits 277783 85465 -192318
+ Misses 69915 15742 -54173
+ Partials 8542 0 -8542
🚀 New features to boost your workflow:
|
Related to #48547
Replace ManifestPath != "" checks with StorageVersion-based checks across Go and C++ code to use the explicit version identifier instead of an indirect side-effect. This makes version gating clearer and decoupled from the manifest path value itself.
Fix statsTask.SetJobInfo to apply manifest path and stats/bm25/text/json operators in a single atomic UpdateSegment call, eliminating a race window where manifest could be updated without stats (or vice versa). The previous code used separate UpdateSegment and UpdateSegmentsInfo calls that could partially fail.
Also fix SetManifestPath SegmentOperator which had a self-comparison bug (segment.GetManifestPath() == segment.GetManifestPath()) causing it to always no-op.