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 2023/06/20 13:36:53 UTC

[doris] branch master updated: [fix](merge-on-write) fix that delete bitmap is not calculated correctly when has sequence column (#20955)

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 b70a14d9c9 [fix](merge-on-write) fix that delete bitmap is not calculated correctly when has sequence column (#20955)
b70a14d9c9 is described below

commit b70a14d9c942a1f2210e230fb9f7797a54c17455
Author: Xin Liao <li...@126.com>
AuthorDate: Tue Jun 20 21:36:47 2023 +0800

    [fix](merge-on-write) fix that delete bitmap is not calculated correctly when has sequence column (#20955)
---
 be/src/olap/tablet.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 41a02a5a1c..2babfed8a0 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -2871,7 +2871,7 @@ Status Tablet::calc_segment_delete_bitmap(RowsetSharedPtr rowset,
         if (num_read == batch_size && num_read != remaining) {
             num_read -= 1;
         }
-        for (size_t i = 0; i < num_read; i++) {
+        for (size_t i = 0; i < num_read; i++, row_id++) {
             Slice key = Slice(index_column->get_data_at(i).data, index_column->get_data_at(i).size);
             RowLocation loc;
             // same row in segments should be filtered
@@ -2888,7 +2888,6 @@ Status Tablet::calc_segment_delete_bitmap(RowsetSharedPtr rowset,
                 return st;
             }
             if (st.is<NOT_FOUND>()) {
-                ++row_id;
                 continue;
             }
 
@@ -2922,10 +2921,11 @@ Status Tablet::calc_segment_delete_bitmap(RowsetSharedPtr rowset,
             }
             // when st = ok
             delete_bitmap->add({loc.rowset_id, loc.segment_id, 0}, loc.row_id);
-            ++row_id;
         }
         remaining -= num_read;
     }
+    DCHECK_EQ(total, row_id) << "segment total rows: " << total << " row_id:" << row_id;
+
     if (pos > 0) {
         RETURN_IF_ERROR(generate_new_block_for_partial_update(
                 rowset_schema, read_plan_ori, read_plan_update, rsid_to_rowset, &block));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org