zhannngchen commented on code in PR #20153: URL: https://github.com/apache/doris/pull/20153#discussion_r1211279533
########## be/src/olap/tablet.cpp: ########## @@ -3264,4 +3241,33 @@ bool Tablet::is_enable_binlog() { void Tablet::set_binlog_config(BinlogConfig binlog_config) { tablet_meta()->set_binlog_config(std::move(binlog_config)); } + +// caller should hold meta_lock +Status Tablet::calc_delete_bitmap_between_segments( + RowsetSharedPtr rowset, const std::vector<segment_v2::SegmentSharedPtr>& segments, + DeleteBitmapPtr delete_bitmap) { + size_t const num_segments = segments.size(); + if (num_segments < 2) { + return Status::OK(); + } + + OlapStopWatch watch; + auto const rowset_id = rowset->rowset_id(); + size_t seq_col_length = 0; + if (_schema->has_sequence_col()) { + auto seq_col_idx = _schema->sequence_col_idx(); + seq_col_length = _schema->column(seq_col_idx).length(); + } + + MergeIndexDeleteBitmapCalculator calculator; + RETURN_IF_ERROR(calculator.init(rowset_id, segments, seq_col_length)); + + RETURN_IF_ERROR(calculator.calculate_all(delete_bitmap)); + + LOG(INFO) << fmt::format( Review Comment: Also print the tablet id and rowset id, which is friendly for debugging. Pls refer to the log at the end of `Tablet::calc_delete_bitmap` -- 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