mirror of https://github.com/milvus-io/milvus.git
Add the `TotalRows` value for the DescribeIndex (#19759)
Signed-off-by: SimFG <bang.fu@zilliz.com> Signed-off-by: SimFG <bang.fu@zilliz.com>pull/19766/head
parent
857bd1fd68
commit
5091a7f362
|
@ -616,6 +616,12 @@ func (i *IndexCoord) completeIndexInfo(ctx context.Context, indexInfo *indexpb.I
|
|||
break
|
||||
}
|
||||
|
||||
totalRow, err := calculateTotalRow()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
indexInfo.TotalRows = totalRow
|
||||
|
||||
indexStates, indexStateCnt := i.metaTable.GetIndexStates(indexID, createTs)
|
||||
allCnt := len(indexStates)
|
||||
switch {
|
||||
|
@ -624,14 +630,11 @@ func (i *IndexCoord) completeIndexInfo(ctx context.Context, indexInfo *indexpb.I
|
|||
indexInfo.IndexStateFailReason = indexStateCnt.FailReason
|
||||
case indexStateCnt.Finished == allCnt:
|
||||
indexInfo.State = commonpb.IndexState_Finished
|
||||
indexInfo.IndexedRows = totalRow
|
||||
default:
|
||||
indexInfo.State = commonpb.IndexState_InProgress
|
||||
indexInfo.IndexedRows = i.metaTable.GetIndexBuildProgress(indexID, createTs)
|
||||
totalRow, err := calculateTotalRow()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
indexInfo.TotalRows = totalRow
|
||||
|
||||
}
|
||||
|
||||
log.Debug("IndexCoord completeIndexInfo success", zap.Int64("collID", collectionID),
|
||||
|
|
Loading…
Reference in New Issue