zhannngchen commented on code in PR #15018: URL: https://github.com/apache/doris/pull/15018#discussion_r1049209184
########## be/src/olap/memtable.h: ########## @@ -224,6 +224,8 @@ class MemTable { DeleteBitmapPtr _delete_bitmap; RowsetIdUnorderedSet _rowset_ids; int64_t _cur_max_version; + // seg ids in one _do_flush for calc delete bitmap + std::vector<int64_t> _seg_ids; Review Comment: @nextdreamblue segment compaction 完成之前,_num_segment 这个变量是单调递增的,问题主要出在rowset_meta 里记录的 segment 数量这里。由于更新 delete bitmap时用的是由 build_tmp()构建的临时的 rowset,这时候不可能做完 segment compaction,所以可以加一个特殊的处理来在 build_tmp()时获取准确的 num_segments ``` void BetaRowsetWriter::_build_rowset_meta(std::shared_ptr<RowsetMeta> rowset_meta, bool temporary) { int64_t num_seg = _is_segcompacted() && !temporary ? _num_segcompacted : _num_segment; ``` @freemandealer pls also help to review this change. -- 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