diff --git a/be/src/runtime/snapshot_loader.cpp b/be/src/runtime/snapshot_loader.cpp index c4dcc7f34def2c..da22a7c9167ef3 100644 --- a/be/src/runtime/snapshot_loader.cpp +++ b/be/src/runtime/snapshot_loader.cpp @@ -316,7 +316,9 @@ Status SnapshotLoader::download(const std::map& src_to } // remove file which will be downloaded now. // this file will be added to local_files if it be downloaded successfully. - local_files.erase(find); + if (find != local_files.end()) { + local_files.erase(find); + } RETURN_IF_ERROR(_remote_fs->download(full_remote_file, full_local_file)); // 3. check md5 of the downloaded file