mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
parent
9e7ef944f7
commit
5cdd52ccf3
@ -302,13 +302,24 @@ func (b *ServerBroker) DescribeIndex(ctx context.Context, colID UniqueID) (*inde
|
||||
}
|
||||
|
||||
func (b *ServerBroker) GcConfirm(ctx context.Context, collectionID, partitionID UniqueID) bool {
|
||||
log := log.Ctx(ctx).With(zap.Int64("collection", collectionID), zap.Int64("partition", partitionID))
|
||||
|
||||
log.Info("confirming if gc is finished")
|
||||
|
||||
req := &datapb.GcConfirmRequest{CollectionId: collectionID, PartitionId: partitionID}
|
||||
resp, err := b.s.dataCoord.GcConfirm(ctx, req)
|
||||
|
||||
if err != nil {
|
||||
log.Warn("gc is not finished", zap.Error(err))
|
||||
return false
|
||||
}
|
||||
|
||||
if resp.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success {
|
||||
log.Warn("gc is not finished", zap.String("code", resp.GetStatus().GetErrorCode().String()),
|
||||
zap.String("reason", resp.GetStatus().GetReason()))
|
||||
return false
|
||||
}
|
||||
|
||||
log.Info("received gc_confirm response", zap.Bool("finished", resp.GetGcFinished()))
|
||||
return resp.GetGcFinished()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user