This is an automated email from the ASF dual-hosted git repository.
zhangchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 868e65d618 [fix](compaction) rowid_conversion should ignore deleted
row (#22579)
868e65d618 is described below
commit 868e65d6183e6cf49ff3b1f3987afbe65fbf4585
Author: huanghaibin <[email protected]>
AuthorDate: Fri Aug 4 11:41:17 2023 +0800
[fix](compaction) rowid_conversion should ignore deleted row (#22579)
---
be/src/olap/rowid_conversion.h | 3 +++
be/src/vec/olap/vertical_block_reader.cpp | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/be/src/olap/rowid_conversion.h b/be/src/olap/rowid_conversion.h
index 940d6a106c..d8e2a058d8 100644
--- a/be/src/olap/rowid_conversion.h
+++ b/be/src/olap/rowid_conversion.h
@@ -54,6 +54,9 @@ public:
void add(const std::vector<RowLocation>& rss_row_ids,
const std::vector<uint32_t>& dst_segments_num_row) {
for (auto& item : rss_row_ids) {
+ if (item.row_id == -1) {
+ continue;
+ }
uint32_t id = _segment_to_id_map.at(
std::pair<RowsetId, uint32_t> {item.rowset_id,
item.segment_id});
if (_cur_dst_segment_id < dst_segments_num_row.size() &&
diff --git a/be/src/vec/olap/vertical_block_reader.cpp
b/be/src/vec/olap/vertical_block_reader.cpp
index 17355135fe..e518f9ba8a 100644
--- a/be/src/vec/olap/vertical_block_reader.cpp
+++ b/be/src/vec/olap/vertical_block_reader.cpp
@@ -455,6 +455,7 @@ Status VerticalBlockReader::_unique_key_next_block(Block*
block, bool* eof) {
.data();
int cur_row = 0;
+ int delete_count = 0;
while (cur_row < block_rows) {
if (_row_sources_buffer->get_agg_flag(row_source_idx)) {
row_source_idx++;
@@ -464,6 +465,8 @@ Status VerticalBlockReader::_unique_key_next_block(Block*
block, bool* eof) {
filter_data[cur_row] = sign;
if (UNLIKELY(!sign)) {
_row_sources_buffer->set_agg_flag(row_source_idx, true);
+ _block_row_locations[cur_row].row_id = -1;
+ delete_count++;
}
cur_row++;
row_source_idx++;
@@ -480,6 +483,7 @@ Status VerticalBlockReader::_unique_key_next_block(Block*
block, bool* eof) {
Block::filter_block(block, target_columns.size(),
target_columns.size()));
_stats.rows_del_filtered += block_rows - block->rows();
DCHECK(block->try_get_by_name("__DORIS_COMPACTION_FILTER__") ==
nullptr);
+ DCHECK_EQ(_block_row_locations.size(), block->rows() +
delete_count);
}
size_t filtered_rows_in_rs_buffer = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]