Fix segments info in drop virtual channel request is not set (#17641)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/17646/head
congqixia 2022-06-20 13:40:12 +08:00 committed by GitHub
parent 0bb415f593
commit 12b3a29db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -679,6 +679,13 @@ func dropVirtualChannelFunc(dsService *dataSyncService, opts ...retry.Option) fl
segment.StartPosition = pos.GetStartPosition()
}
// assign segments to request
segments := make([]*datapb.DropVirtualChannelSegment, 0, len(segmentPack))
for _, segment := range segmentPack {
segments = append(segments, segment)
}
req.Segments = segments
err := retry.Do(context.Background(), func() error {
rsp, err := dsService.dataCoord.DropVirtualChannel(context.Background(), req)
// should be network issue, return error and retry