diff --git a/dbms/src/Flash/Mpp/AsyncRequestHandler.h b/dbms/src/Flash/Mpp/AsyncRequestHandler.h index f13a831074e..fb86efbe476 100644 --- a/dbms/src/Flash/Mpp/AsyncRequestHandler.h +++ b/dbms/src/Flash/Mpp/AsyncRequestHandler.h @@ -79,7 +79,7 @@ class AsyncRequestHandler : public AsyncRequestHandlerBase : cq(&(GRPCCompletionQueuePool::global_instance->pickQueue())) , rpc_context(context) , request(std::move(req)) - , req_info(fmt::format("tunnel{}+{}", req.send_task_id, req.recv_task_id)) + , req_info(fmt::format("async tunnel{}+{}", req.send_task_id, req.recv_task_id)) , has_data(false) , retry_times(0) , stage(AsyncRequestStage::NEED_INIT) diff --git a/dbms/src/Flash/Mpp/ExchangeReceiver.cpp b/dbms/src/Flash/Mpp/ExchangeReceiver.cpp index af991163d35..1ea6a91d9b8 100644 --- a/dbms/src/Flash/Mpp/ExchangeReceiver.cpp +++ b/dbms/src/Flash/Mpp/ExchangeReceiver.cpp @@ -590,12 +590,13 @@ void ExchangeReceiverBase::setUpLocalConnections(std::vectoridentifier(), req_info)); LocalRequestHandler local_request_handler( getMemoryTracker(), - [this](bool meet_error, const String & local_err_msg) { - this->connectionDone(meet_error, local_err_msg, exc_log); + [this, log = local_log](bool meet_error, const String & local_err_msg) { + this->connectionDone(meet_error, local_err_msg, log); }, [this]() { this->connectionLocalDone(); @@ -603,7 +604,7 @@ void ExchangeReceiverBase::setUpLocalConnections(std::vectoraddLocalConnectionNum(); }, - ReceiverChannelWriter(&(getMsgChannels()), req_info, exc_log, getDataSizeInQueue(), ReceiverMode::Local)); + ReceiverChannelWriter(&(getMsgChannels()), req_info, local_log, getDataSizeInQueue(), ReceiverMode::Local)); rpc_context->establishMPPConnectionLocalV2( req, diff --git a/dbms/src/Flash/Pipeline/Schedule/Events/Event.cpp b/dbms/src/Flash/Pipeline/Schedule/Events/Event.cpp index 417cbb75e07..0aef549ed9c 100644 --- a/dbms/src/Flash/Pipeline/Schedule/Events/Event.cpp +++ b/dbms/src/Flash/Pipeline/Schedule/Events/Event.cpp @@ -212,9 +212,8 @@ void Event::switchStatus(EventStatus from, EventStatus to) magic_enum::enum_name(from), magic_enum::enum_name(to), magic_enum::enum_name(status.load())); -#ifndef NDEBUG - LOG_TRACE(log, "switch status: {} --> {}", magic_enum::enum_name(from), magic_enum::enum_name(to)); -#endif // !NDEBUG + + LOG_DEBUG(log, "switch status: {} --> {}", magic_enum::enum_name(from), magic_enum::enum_name(to)); } void Event::assertStatus(EventStatus expect) diff --git a/dbms/src/Flash/Pipeline/Schedule/Tasks/Task.cpp b/dbms/src/Flash/Pipeline/Schedule/Tasks/Task.cpp index c7167400d47..a22d721d965 100644 --- a/dbms/src/Flash/Pipeline/Schedule/Tasks/Task.cpp +++ b/dbms/src/Flash/Pipeline/Schedule/Tasks/Task.cpp @@ -77,12 +77,14 @@ Task::Task(MemoryTrackerPtr mem_tracker_, const String & req_id) Task::~Task() { - RUNTIME_ASSERT( - task_status == ExecTaskStatus::FINALIZE, - log, - "The state of the Task must be {} before it is destructed, but it is actually {}", - magic_enum::enum_name(ExecTaskStatus::FINALIZE), - magic_enum::enum_name(task_status)); + if unlikely (task_status != ExecTaskStatus::FINALIZE) + { + LOG_WARNING( + log, + "The state of the Task should be {} before it is destructed, but it is actually {}", + magic_enum::enum_name(ExecTaskStatus::FINALIZE), + magic_enum::enum_name(task_status)); + } } #define CHECK_FINISHED \