Skip to content

Commit

Permalink
[fix](cancel) Fix wrong status when query failed (#38982)
Browse files Browse the repository at this point in the history
Pipeline task A failed with `Status A`, pipeline task B should also fail
with same `Status A` instead of just returning a CANCELLED.
  • Loading branch information
zhiqiang-hhhh authored and dataroaring committed Aug 16, 2024
1 parent 5645dc5 commit b5c9324
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions be/src/runtime/runtime_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,11 @@ class RuntimeState {
std::string _s3_error_log_file_path;
};

#define RETURN_IF_CANCELLED(state) \
do { \
if (UNLIKELY((state)->is_cancelled())) return Status::Cancelled("Cancelled"); \
#define RETURN_IF_CANCELLED(state) \
do { \
if (UNLIKELY((state)->is_cancelled())) { \
return (state)->cancel_reason(); \
} \
} while (false)

} // namespace doris

0 comments on commit b5c9324

Please sign in to comment.