imay commented on a change in pull request #1193: Fix bug that restore process 
in BE causes BE crash 
URL: https://github.com/apache/incubator-doris/pull/1193#discussion_r286847449
 
 

 ##########
 File path: be/src/runtime/snapshot_loader.cpp
 ##########
 @@ -555,12 +568,16 @@ Status SnapshotLoader::move(
             return Status(ss.str());
         }
 
-        // copy files one by one
+        // link files one by one
+        // files in snapshot dir will be moved in snapshot clean process
         for (auto& file : snapshot_files) {
             std::string full_src_path = snapshot_path + "/" + file;
             std::string full_dest_path = tablet_path + "/" + file;
-            RETURN_IF_ERROR(FileUtils::copy_file(full_src_path, 
full_dest_path));
-            VLOG(2) << "copy file from " << full_src_path<< " to " << 
full_dest_path;
+            if (link(full_src_path.c_str(), full_dest_path.c_str()) != 0) {
 
 Review comment:
   if this function return failed, who will clean the already linked files 
   
   get the error msg for link error

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to