imay commented on a change in pull request #1590: Implement BetaRowsetWriter
URL: https://github.com/apache/incubator-doris/pull/1590#discussion_r312726027
##########
File path: be/src/olap/rowset/segment_group.cpp
##########
@@ -902,23 +863,27 @@ OLAPStatus SegmentGroup::link_segments_to_path(const
std::string& dest_path, int
for (int segment_id = 0; segment_id < _num_segments; segment_id++) {
std::string data_file_name = _construct_file_name(rowset_id,
segment_id, ".dat");
std::string new_data_file_path = dest_path + "/" + data_file_name;
- if (!check_dir_existed(new_data_file_path)) {
- std::string origin_data_file_path =
construct_data_file_path(_rowset_path_prefix, segment_id);
- if (link(origin_data_file_path.c_str(),
new_data_file_path.c_str()) != 0) {
- LOG(WARNING) << "fail to create hard link. from=" <<
origin_data_file_path
- << ", to=" << new_data_file_path << ", error=" <<
strerror(errno);
- return OLAP_ERR_OS_ERROR;
- }
+ if (check_dir_existed(new_data_file_path)) {
Review comment:
In the original implementation, if `new_data_file_path` exists, origin code
think it may be other operation did it, and code will continue as normal. If
you return ERROR here, if we fail one time, we will fail every time later.
----------------------------------------------------------------
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]