This is an automated email from the ASF dual-hosted git repository. lichaoyong 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 75ebe2b [Bug] Compaction row number cannot be matched between input rowsets and output rowsets. (#4139) 75ebe2b is described below commit 75ebe2b3639314ea6c1f3a0d66bc53053b0dba2f Author: lichaoyong <lichaoyong...@gmail.com> AuthorDate: Thu Jul 23 10:28:56 2020 +0800 [Bug] Compaction row number cannot be matched between input rowsets and output rowsets. (#4139) Unique Key table will load duplicate rows for different loads. If exists duplicate row between loads. Compaction will merge this rows. The statistics should take this merged number into consideration. Now, We missed the merged number. So it will encounter error when compaction. --- be/src/olap/reader.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/be/src/olap/reader.cpp b/be/src/olap/reader.cpp index 06a0965..5a2017f 100644 --- a/be/src/olap/reader.cpp +++ b/be/src/olap/reader.cpp @@ -405,6 +405,7 @@ OLAPStatus Reader::_agg_key_next_row(RowCursor* row_cursor, MemPool* mem_pool, O OLAPStatus Reader::_unique_key_next_row(RowCursor* row_cursor, MemPool* mem_pool, ObjectPool* agg_pool, bool* eof) { *eof = false; bool cur_delete_flag = false; + int64_t merged_count = 0; do { if (UNLIKELY(_next_key == nullptr)) { *eof = true; @@ -431,14 +432,14 @@ OLAPStatus Reader::_unique_key_next_row(RowCursor* row_cursor, MemPool* mem_pool if (!equal_row(_key_cids, *row_cursor, *_next_key)) { break; } + ++merged_count; } if (!cur_delete_flag) { - return OLAP_SUCCESS; + break; } - _stats.rows_del_filtered++; } while (cur_delete_flag); - + _merged_rows += merged_count; return OLAP_SUCCESS; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org