From 61786f769c36f8a9c4d2000d7038336c233c1721 Mon Sep 17 00:00:00 2001 From: godchen Date: Wed, 28 Jul 2021 16:31:22 +0800 Subject: [PATCH] Add file exist check (#6840) Signed-off-by: godchen --- internal/storage/vector_chunk_manager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/storage/vector_chunk_manager.go b/internal/storage/vector_chunk_manager.go index 367da739b0..286923419f 100644 --- a/internal/storage/vector_chunk_manager.go +++ b/internal/storage/vector_chunk_manager.go @@ -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 {