freemandealer commented on code in PR #17874:
URL: https://github.com/apache/doris/pull/17874#discussion_r1141314968


##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -255,13 +279,35 @@ Status 
BetaRowsetWriter::_rename_compacted_segment_plain(uint64_t seg_id) {
         _segid_statistics_map.emplace(_num_segcompacted, org);
         _clear_statistics_for_deleting_segments_unsafe(seg_id, seg_id);
     }
-    ++_num_segcompacted;
     ret = rename(src_seg_path.c_str(), dst_seg_path.c_str());
     if (ret) {
         LOG(WARNING) << "failed to rename " << src_seg_path << " to " << 
dst_seg_path
                      << ". ret:" << ret << " errno:" << errno;
         return Status::Error<ROWSET_RENAME_FILE_FAILED>();
     }
+    // rename remaining inverted index files

Review Comment:
   the following code is similar to the code beginning with line 227 except for 
the path logic. Can we make a common function here to eliminate duplication?



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to