yiguolei commented on a change in pull request #1297: Add copy function to 
support storage migration task
URL: https://github.com/apache/incubator-doris/pull/1297#discussion_r293239820
 
 
 ##########
 File path: be/src/olap/rowset/segment_group.cpp
 ##########
 @@ -723,6 +723,39 @@ OLAPStatus SegmentGroup::make_snapshot(const std::string& 
snapshot_path,
     return OLAP_SUCCESS;
 }
 
+OLAPStatus SegmentGroup::copy_files_to_path(const std::string& dest_path,
+                                            std::vector<std::string>* 
success_files) {
+    if (_empty) {
+        return OLAP_SUCCESS;
+    }
+    for (int segment_id = 0; segment_id < _num_segments; segment_id++) {
+        std::string dest_data_file = construct_data_file_path(dest_path, 
segment_id);
+        if (!check_dir_existed(dest_data_file)) {
 
 Review comment:
   If exist file, then should check its length  or remove the exist file?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to