Skip to content

Commit

Permalink
fix: Direct forward delta exclude l0 segments
Browse files Browse the repository at this point in the history
Related to milvus-io#36887

Forward delete to L0 segment will return error and mark l0 segment
offline causing delegator unserviceable

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Oct 16, 2024
1 parent f3b6792 commit afc4a9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/querynodev2/delegator/delta_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,22 @@ func (sd *shardDelegator) forwardStreamingDirect(ctx context.Context, deleteData
worker, err := sd.workerManager.GetWorker(ctx, entry.NodeID)
if err != nil {
log.Warn("failed to get worker",
zap.Int64("nodeID", paramtable.GetNodeID()),
zap.Int64("nodeID", entry.NodeID),
zap.Error(err),
)
// skip if node down
// delete will be processed after loaded again
continue
}
// forward to non level0 segment only
segments := lo.Filter(entry.Segments, func(segmentEntry SegmentEntry, _ int) bool {
return segmentEntry.Level != datapb.SegmentLevel_L0
})

eg.Go(func() error {
offlineSegments.Upsert(sd.applyDelete(ctx, entry.NodeID, worker, func(segmentID int64) (DeleteData, bool) {
return deleteData, true
}, entry.Segments, querypb.DataScope_Historical)...)
}, segments, querypb.DataScope_Historical)...)
return nil
})
}
Expand Down

0 comments on commit afc4a9a

Please sign in to comment.