chaoyli 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_r293262297
##########
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:
I check dir exist or not firstly.
----------------------------------------------------------------
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]