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 2023/06/07 01:55:26 UTC

[doris] 02/04: [enhancement](merge-on-write) avoid unecessary pk index iteration (#19620)

This is an automated email from the ASF dual-hosted git repository.

zhangchen pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 7e02ee9a02a6ff9e7f0b707d125c942dc74f42fd
Author: zhannngchen <48...@users.noreply.github.com>
AuthorDate: Tue May 16 17:05:14 2023 +0800

    [enhancement](merge-on-write) avoid unecessary pk index iteration (#19620)
---
 be/src/olap/delta_writer.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index 75ec2eea43..480e09d925 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -405,8 +405,11 @@ Status DeltaWriter::close_wait(const PSlaveTabletNodes& slave_tablet_nodes,
             SchemaChangeHandler::tablet_in_converting(_tablet->tablet_id())) {
             return Status::OK();
         }
-        RETURN_IF_ERROR(_tablet->calc_delete_bitmap(beta_rowset->rowset_id(), segments, nullptr,
-                                                    _delete_bitmap, _cur_max_version, true));
+        if (segments.size() > 1) {
+            RETURN_IF_ERROR(_tablet->calc_delete_bitmap(beta_rowset->rowset_id(), segments, nullptr,
+                                                        _delete_bitmap, _cur_max_version, true));
+        }
+
         _storage_engine->txn_manager()->set_txn_related_delete_bitmap(
                 _req.partition_id, _req.txn_id, _tablet->tablet_id(), _tablet->schema_hash(),
                 _tablet->tablet_uid(), true, _delete_bitmap, _rowset_ids);


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