qidaye commented on code in PR #17874: URL: https://github.com/apache/doris/pull/17874#discussion_r1141593894
########## be/src/olap/rowset/beta_rowset.cpp: ########## @@ -88,6 +88,22 @@ std::string BetaRowset::local_segment_path_segcompacted(const std::string& table return fmt::format("{}/{}_{}-{}.dat", tablet_path, rowset_id.to_string(), begin, end); } +std::string BetaRowset::inverted_index_file_path(const string& rowset_dir, + const RowsetId& rowset_id, int segment_id, + int64_t index_id) { + // {rowset_dir}/{schema_hash}/{rowset_id}_{seg_num}_{index_id}.idx + return fmt::format("{}/{}_{}_{}.idx", rowset_dir, rowset_id.to_string(), segment_id, index_id); +} Review Comment: done ########## 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: done -- 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