You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/07/24 01:29:25 UTC
(doris) branch master updated: [fix](compaction) fix the issue of writing segment with 0 rows during compaction (#38251)
This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 83276c96ae3 [fix](compaction) fix the issue of writing segment with 0 rows during compaction (#38251)
83276c96ae3 is described below
commit 83276c96ae3ad79b377a8f72536d4605fa8fed9b
Author: Luwei <81...@qq.com>
AuthorDate: Wed Jul 24 09:29:19 2024 +0800
[fix](compaction) fix the issue of writing segment with 0 rows during compaction (#38251)
https://github.com/apache/doris/pull/37960 introduced this issue
---
be/src/olap/rowset/vertical_beta_rowset_writer.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/rowset/vertical_beta_rowset_writer.cpp b/be/src/olap/rowset/vertical_beta_rowset_writer.cpp
index 942ced616fc..e0c1b65059f 100644
--- a/be/src/olap/rowset/vertical_beta_rowset_writer.cpp
+++ b/be/src/olap/rowset/vertical_beta_rowset_writer.cpp
@@ -89,7 +89,7 @@ Status VerticalBetaRowsetWriter<T>::add_columns(const vectorized::Block* block,
VLOG_NOTICE << "num_rows_written: " << num_rows_written
<< ", _cur_writer_idx: " << _cur_writer_idx;
uint32_t num_rows_key_group = _segment_writers[_cur_writer_idx]->row_count();
- CHECK_LE(num_rows_written, num_rows_key_group);
+ CHECK_LT(num_rows_written, num_rows_key_group);
// init if it's first value column write in current segment
if (num_rows_written == 0) {
VLOG_NOTICE << "init first value column segment writer";
@@ -104,7 +104,8 @@ Status VerticalBetaRowsetWriter<T>::add_columns(const vectorized::Block* block,
left -= to_write;
CHECK_GE(left, 0);
- if (left > 0) {
+ if (num_rows_key_group == num_rows_written + to_write &&
+ _cur_writer_idx < _segment_writers.size() - 1) {
++_cur_writer_idx;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org