Return buildID when creating index if the index alreay exists (#17045)

Signed-off-by: Cai.Zhang <cai.zhang@zilliz.com>
pull/17058/head
cai.zhang 2022-05-17 15:21:57 +08:00 committed by GitHub
parent c2f1d65fa1
commit d6bb86dd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -921,7 +921,8 @@ func (c *Core) BuildIndex(ctx context.Context, segID typeutil.UniqueID, field *s
sp, ctx := trace.StartSpanFromContext(ctx)
defer sp.Finish()
if c.MetaTable.IsSegmentIndexed(segID, field, idxInfo.IndexParams) {
return 0, nil
info, err := c.MetaTable.GetSegmentIndexInfoByID(segID, field.FieldID, idxInfo.GetIndexName())
return info.BuildID, err
}
rows, err := c.CallGetNumRowsService(ctx, segID, isFlush)
if err != nil {