yiguolei commented on code in PR #41991:
URL: https://github.com/apache/doris/pull/41991#discussion_r1804145880


##########
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:
##########
@@ -314,39 +300,26 @@ Status 
PartitionedHashJoinProbeLocalState::recover_build_blocks_from_disk(Runtim
     }
     spilled_stream->set_read_counters(profile());
 
-    std::weak_ptr<PartitionedHashJoinSharedState> shared_state_holder =
-            _shared_state->shared_from_this();
-
     auto query_id = state->query_id();
 
-    auto read_func = [this, query_id, state, spilled_stream = spilled_stream, 
shared_state_holder,
-                      partition_index] {
-        auto shared_state_sptr = shared_state_holder.lock();
-        if (!shared_state_sptr || state->is_cancelled()) {
-            LOG(INFO) << "query: " << print_id(query_id)
-                      << " execution_context released, maybe query was 
cancelled.";
-            return;
-        }
-
+    auto read_func = [this, query_id, state, spilled_stream = spilled_stream, 
partition_index] {
         SCOPED_TIMER(_recovery_build_timer);
 
         bool eos = false;
         VLOG_DEBUG << "query: " << print_id(state->query_id()) << ", node: " 
<< _parent->node_id()
                    << ", task id: " << state->task_id() << ", partition: " << 
partition_index
                    << ", recoverying build data";
+        Status status;
         while (!eos) {
             vectorized::Block block;
-            Status st;
             
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recover_build_blocks",
 {
-                st = Status::Error<INTERNAL_ERROR>(
+                status = Status::Error<INTERNAL_ERROR>(
                         "fault_inject partitioned_hash_join_probe 
recover_build_blocks failed");
             });
-            if (st.ok()) {
-                st = spilled_stream->read_next_block_sync(&block, &eos);
+            if (status.ok()) {
+                status = spilled_stream->read_next_block_sync(&block, &eos);
             }

Review Comment:
   else
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to