IndexNode finished the task before IndexCoord changes the meta (#10821)

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/10836/head
cai.zhang 2021-10-28 18:20:27 +08:00 committed by GitHub
parent 3c2a46f2be
commit e5f159ddd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -173,6 +173,11 @@ func (mt *metaTable) BuildIndex(indexBuildID UniqueID, nodeID int64) error {
// return fmt.Errorf("can not set lease key, index with ID = %d state is %d", indexBuildID, meta.indexMeta.State)
//}
if meta.indexMeta.State == commonpb.IndexState_Finished || meta.indexMeta.State == commonpb.IndexState_Failed {
log.Debug("This index task has been finished", zap.Int64("indexBuildID", indexBuildID),
zap.Any("index state", meta.indexMeta.State))
return nil
}
meta.indexMeta.NodeID = nodeID
meta.indexMeta.State = commonpb.IndexState_InProgress