Make LoadCollection compatible (#17669)

See also: #17656

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
pull/17671/head
XuanYang-cn 2022-06-21 17:26:15 +08:00 committed by GitHub
parent 1e87b54542
commit e43f487f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2576,6 +2576,11 @@ func (lct *loadCollectionTask) PreExecute(ctx context.Context) error {
return err
}
// To compat with LoadCollcetion before Milvus@2.1
if lct.ReplicaNumber == 0 {
lct.ReplicaNumber = 1
}
return nil
}