-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: Alter compactTo segments before compactFrom to avoid data loss if crash #34513
Conversation
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #34513 +/- ##
===========================================
- Coverage 84.39% 71.50% -12.89%
===========================================
Files 876 1127 +251
Lines 115815 139314 +23499
===========================================
+ Hits 97740 99614 +1874
- Misses 13757 35414 +21657
+ Partials 4318 4286 -32
|
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
@wayblink E2e jenkins job failed, comment |
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
@wayblink E2e jenkins job failed, comment |
rerun ut |
@wayblink E2e jenkins job failed, comment |
/run-cpu-e2e |
Signed-off-by: wayblink <anyang.wang@zilliz.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: czs007, wayblink 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 |
binlogs = append(binlogs, metastore.BinlogsIncrement{Segment: seg}) | ||
} | ||
if err := m.catalog.AlterSegments(m.ctx, append(compactFromInfos, newSegmentInfos...), binlogs...); err != nil { | ||
log.Warn("fail to alter segments and new segment", zap.Error(err)) | ||
// alter compactTo before compactFrom segments to avoid data lost if service crash during AlterSegments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do m.segments.SetSegment(compactToSegmentInfo.GetID(), compactToSegmentInfo)
after we store compactToInfos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can not finish this call in one request seems to be dangerous.
can we only handle 100 segments max at a time?
…ss if crash (milvus-io#34513) milvus-io#34512 Signed-off-by: wayblink <anyang.wang@zilliz.com>
#34512