You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zh...@apache.org on 2019/12/21 04:13:56 UTC
[incubator-doris] branch master updated: Fix compaction with delete
rowset bug (#2523)
This is an automated email from the ASF dual-hosted git repository.
zhaoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new b4d935a Fix compaction with delete rowset bug (#2523)
b4d935a is described below
commit b4d935ab37e6ae8ef368c49e9b8be483d0c1317c
Author: kangpinghuang <kp...@163.com>
AuthorDate: Sat Dec 21 12:13:46 2019 +0800
Fix compaction with delete rowset bug (#2523)
[STORAGE][SEGMENTV2]
when base compaction rowsets with delete rowset of more than two
condition, stats rows_del_filtered is wrong and compaction will
fail because of line check.
---
be/src/olap/rowset/segment_v2/column_reader.cpp | 3 ---
be/src/olap/rowset/segment_v2/segment_iterator.cpp | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/rowset/segment_v2/column_reader.cpp b/be/src/olap/rowset/segment_v2/column_reader.cpp
index d50ae9e..5f16d1f 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/column_reader.cpp
@@ -193,9 +193,6 @@ Status ColumnReader::_get_filtered_pages(CondColumn* cond_column,
int state = col_cond->del_eval({min_value.get(), max_value.get()});
if (state == DEL_SATISFIED) {
should_read = false;
- rowid_t page_first_id = _ordinal_index->get_first_row_id(i);
- rowid_t page_last_id = _ordinal_index->get_last_row_id(i);
- stats->rows_del_filtered += page_last_id - page_first_id + 1;
break;
} else if (state == DEL_PARTIAL_SATISFIED) {
delete_partial_filtered_pages->push_back(i);
diff --git a/be/src/olap/rowset/segment_v2/segment_iterator.cpp b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
index 2c832ed..805f660 100644
--- a/be/src/olap/rowset/segment_v2/segment_iterator.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_iterator.cpp
@@ -149,7 +149,9 @@ Status SegmentIterator::_get_row_ranges_by_column_conditions() {
if (_opts.conditions != nullptr || _opts.delete_conditions.size() > 0) {
RowRanges condition_row_ranges;
RETURN_IF_ERROR(_get_row_ranges_from_conditions(&condition_row_ranges));
+ size_t pre_size = _row_bitmap.cardinality();
_row_bitmap &= RowRanges::ranges_to_roaring(condition_row_ranges);
+ _opts.stats->rows_del_filtered += (pre_size - _row_bitmap.cardinality());
}
// TODO(hkp): calculate filter rate to decide whether to
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org