Add file exist check (#6840)

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
This commit is contained in:
godchen 2021-07-28 16:31:22 +08:00 committed by GitHub
parent 1a61a15960
commit 61786f769c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,9 @@ func NewVectorChunkManager(localChunkManager ChunkManager, remoteChunkManager Ch
}
func (vcm *VectorChunkManager) DownloadVectorFile(key string, schema *etcdpb.CollectionMeta) error {
if vcm.localChunkManager.Exist(key) {
return nil
}
insertCodec := NewInsertCodec(schema)
content, err := vcm.remoteChunkManager.Read(key)
if err != nil {