This is an automated email from the ASF dual-hosted git repository. w41ter pushed a commit to branch avoid_change_the_hardlink in repository https://gitbox.apache.org/repos/asf/doris.git
commit 0564a04a25b992ee92cbd0988354f049f13154f8 Author: w41ter <[email protected]> AuthorDate: Fri May 9 07:25:09 2025 +0000 [fix](restore) avoid change the hard link files of a snapshot --- be/src/runtime/snapshot_loader.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/be/src/runtime/snapshot_loader.cpp b/be/src/runtime/snapshot_loader.cpp index 2a4860ba9c1..0985ff3d9b4 100644 --- a/be/src/runtime/snapshot_loader.cpp +++ b/be/src/runtime/snapshot_loader.cpp @@ -472,11 +472,13 @@ Status SnapshotLoader::remote_http_download( ec.message()); } std::string md5; - auto status = io::global_local_filesystem()->md5sum(local_file_path, &md5); - if (!status.ok()) { - LOG(WARNING) << "download file error, local file " << local_file_path - << " md5sum: " << status.to_string(); - return status; + if (config::enable_download_md5sum_check) { + auto status = io::global_local_filesystem()->md5sum(local_file_path, &md5); + if (!status.ok()) { + LOG(WARNING) << "download file error, local file " << local_file_path + << " md5sum: " << status.to_string(); + return status; + } } local_files[local_file] = {local_file_size, md5}; } @@ -565,7 +567,9 @@ Status SnapshotLoader::remote_http_download( continue; } - if (auto& local_filestat = it->second; local_filestat.md5 != remote_filestat.md5) { + if (auto& local_filestat = it->second; + !remote_filestat.md5.empty() && // compatible with old version + local_filestat.md5 != remote_filestat.md5) { need_download_files.emplace_back(remote_file); continue; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
