You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/06 07:32:33 UTC

[doris] 08/09: [Enhancement](compaction) return error instead of core when ctx not valid (#18363)

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

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

commit fad86c9e661462886828c769a8efc272a1b5573d
Author: yixiutt <10...@users.noreply.github.com>
AuthorDate: Tue Apr 4 12:27:13 2023 +0800

    [Enhancement](compaction) return error instead of core when ctx not valid (#18363)
---
 be/src/vec/olap/vertical_merge_iterator.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/be/src/vec/olap/vertical_merge_iterator.cpp b/be/src/vec/olap/vertical_merge_iterator.cpp
index cef1b7e8cb..14fb8226f1 100644
--- a/be/src/vec/olap/vertical_merge_iterator.cpp
+++ b/be/src/vec/olap/vertical_merge_iterator.cpp
@@ -517,6 +517,10 @@ Status VerticalMaskMergeIterator::unique_key_next_row(vectorized::IteratorRowRef
         auto& ctx = _origin_iter_ctx[order];
         RETURN_IF_ERROR(ctx->init(_opts));
         DCHECK(ctx->valid());
+        if (!ctx->valid()) {
+            LOG(INFO) << "VerticalMergeIteratorContext not valid";
+            return Status::InternalError("VerticalMergeIteratorContext not valid");
+        }
 
         if (UNLIKELY(ctx->is_first_row()) && !row_source.agg_flag()) {
             // first row in block, don't call ctx->advance
@@ -550,6 +554,10 @@ Status VerticalMaskMergeIterator::next_batch(Block* block) {
         auto& ctx = _origin_iter_ctx[order];
         RETURN_IF_ERROR(ctx->init(_opts));
         DCHECK(ctx->valid());
+        if (!ctx->valid()) {
+            LOG(INFO) << "VerticalMergeIteratorContext not valid";
+            return Status::InternalError("VerticalMergeIteratorContext not valid");
+        }
 
         // find max same source count in cur ctx
         size_t limit = std::min(ctx->remain_rows(), _block_row_max - rows);


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