Skip to content

Commit

Permalink
enhance: UpdateSegmentsInfo should update remaining segment info even…
Browse files Browse the repository at this point in the history
… if some one not exist (#36726)

Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd authored Oct 10, 2024
1 parent 62679ef commit a5f98e4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/datacoord/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,10 +1011,12 @@ func (m *meta) UpdateSegmentsInfo(operators ...UpdateOperator) error {
}

for _, operator := range operators {
ok := operator(updatePack)
if !ok {
return nil
}
operator(updatePack)
}

// skip if all segment not exist
if len(updatePack.segments) == 0 {
return nil
}

segments := lo.MapToSlice(updatePack.segments, func(_ int64, segment *SegmentInfo) *datapb.SegmentInfo { return segment.SegmentInfo })
Expand Down

0 comments on commit a5f98e4

Please sign in to comment.