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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 56eb5ea00c5daf435ace18b06ea9d2ec934cb483
Author: zhannngchen <48427519+zhannngc...@users.noreply.github.com>
AuthorDate: Thu Apr 18 20:40:06 2024 +0800

    [enhancement](partial-update) print more log while  missed some rowsets 
(#33711)
---
 be/src/olap/rowset/segment_v2/segment_writer.cpp          | 15 ++++++++-------
 be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp | 15 ++++++++-------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/be/src/olap/rowset/segment_v2/segment_writer.cpp 
b/be/src/olap/rowset/segment_v2/segment_writer.cpp
index 284e0e0eaaa..377ffd6a56c 100644
--- a/be/src/olap/rowset/segment_v2/segment_writer.cpp
+++ b/be/src/olap/rowset/segment_v2/segment_writer.cpp
@@ -455,19 +455,20 @@ Status 
SegmentWriter::append_block_with_partial_content(const vectorized::Block*
                 
!_opts.rowset_ctx->partial_update_info->can_insert_new_rows_in_partial_update;
         specified_rowsets =
                 tablet->get_rowset_by_ids(&_mow_context->rowset_ids, 
should_include_stale);
-        if (_opts.rowset_ctx->partial_update_info->is_strict_mode &&
-            specified_rowsets.size() != _mow_context->rowset_ids.size()) {
+        if (specified_rowsets.size() != _mow_context->rowset_ids.size()) {
             // Only when this is a strict mode partial update that missing 
rowsets here will lead to problems.
             // In other case, the missing rowsets will be calculated in later 
phases(commit phase/publish phase)
             LOG(WARNING) << fmt::format(
                     "[Memtable Flush] some rowsets have been deleted due to "
-                    "compaction(specified_rowsets.size()={}, but 
rowset_ids.size()={}) in strict "
-                    "mode partial update. tablet_id: {}, cur max_version: {}, 
transaction_id: {}",
+                    "compaction(specified_rowsets.size()={}, but 
rowset_ids.size()={}) in "
+                    "partial update. tablet_id: {}, cur max_version: {}, 
transaction_id: {}",
                     specified_rowsets.size(), _mow_context->rowset_ids.size(), 
_tablet->tablet_id(),
                     _mow_context->max_version, _mow_context->txn_id);
-            return Status::InternalError<false>(
-                    "[Memtable Flush] some rowsets have been deleted due to "
-                    "compaction in strict mode partial update");
+            if (_opts.rowset_ctx->partial_update_info->is_strict_mode) {
+                return Status::InternalError<false>(
+                        "[Memtable Flush] some rowsets have been deleted due 
to "
+                        "compaction in strict mode partial update");
+            }
         }
     }
     std::vector<std::unique_ptr<SegmentCacheHandle>> 
segment_caches(specified_rowsets.size());
diff --git a/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp 
b/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp
index 2a4f924b98a..faa2ccdd321 100644
--- a/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp
+++ b/be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp
@@ -387,19 +387,20 @@ Status 
VerticalSegmentWriter::_append_block_with_partial_content(RowsInBlock& da
                 
!_opts.rowset_ctx->partial_update_info->can_insert_new_rows_in_partial_update;
         specified_rowsets =
                 tablet->get_rowset_by_ids(&_mow_context->rowset_ids, 
should_include_stale);
-        if (_opts.rowset_ctx->partial_update_info->is_strict_mode &&
-            specified_rowsets.size() != _mow_context->rowset_ids.size()) {
+        if (specified_rowsets.size() != _mow_context->rowset_ids.size()) {
             // Only when this is a strict mode partial update that missing 
rowsets here will lead to problems.
             // In other case, the missing rowsets will be calculated in later 
phases(commit phase/publish phase)
             LOG(WARNING) << fmt::format(
                     "[Memtable Flush] some rowsets have been deleted due to "
-                    "compaction(specified_rowsets.size()={}, but 
rowset_ids.size()={}) in strict "
-                    "mode partial update. tablet_id: {}, cur max_version: {}, 
transaction_id: {}",
+                    "compaction(specified_rowsets.size()={}, but 
rowset_ids.size()={}) in "
+                    "partial update. tablet_id: {}, cur max_version: {}, 
transaction_id: {}",
                     specified_rowsets.size(), _mow_context->rowset_ids.size(), 
_tablet->tablet_id(),
                     _mow_context->max_version, _mow_context->txn_id);
-            return Status::InternalError<false>(
-                    "[Memtable Flush] some rowsets have been deleted due to "
-                    "compaction in strict mode partial update");
+            if (_opts.rowset_ctx->partial_update_info->is_strict_mode) {
+                return Status::InternalError<false>(
+                        "[Memtable Flush] some rowsets have been deleted due 
to "
+                        "compaction in strict mode partial update");
+            }
         }
     }
     std::vector<std::unique_ptr<SegmentCacheHandle>> 
segment_caches(specified_rowsets.size());


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

Reply via email to