You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by w4...@apache.org on 2025/05/09 07:25:38 UTC

(doris) branch avoid_change_the_hardlink created (now 0564a04a25b)

This is an automated email from the ASF dual-hosted git repository.

w41ter pushed a change to branch avoid_change_the_hardlink
in repository https://gitbox.apache.org/repos/asf/doris.git


      at 0564a04a25b [fix](restore) avoid change the hard link files of a snapshot

This branch includes the following new commits:

     new 0564a04a25b [fix](restore) avoid change the hard link files of a snapshot

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


(doris) 01/01: [fix](restore) avoid change the hard link files of a snapshot

Posted by w4...@apache.org.
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 <ma...@selectdb.com>
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org