You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Gabriel39 (via GitHub)" <gi...@apache.org> on 2023/03/01 08:32:48 UTC
[GitHub] [doris] Gabriel39 commented on a diff in pull request #17287: [minor](log) add some logs
Gabriel39 commented on code in PR #17287:
URL: https://github.com/apache/doris/pull/17287#discussion_r1121343092
##########
be/src/pipeline/exec/exchange_sink_buffer.cpp:
##########
@@ -197,53 +197,91 @@ Status ExchangeSinkBuffer::_send_rpc(InstanceLoId id) {
return Status::OK();
}
-#define DO_RPC(QUEUE, BLOCK, HOLDER) \
- auto& request = QUEUE.front(); \
- if (!_instance_to_request[id]) { \
- _construct_request(id); \
- } \
- auto brpc_request = _instance_to_request[id]; \
- brpc_request->set_eos(request.eos); \
- brpc_request->set_packet_seq(_instance_to_seq[id]++); \
- if (request.BLOCK) { \
- brpc_request->set_allocated_block(request.BLOCK); \
- } \
- auto* _closure = new SelfDeleteClosure<PTransmitDataResult>(id, request.eos, HOLDER); \
- _closure->cntl.set_timeout_ms(request.channel->_brpc_timeout_ms); \
- _closure->addFailedHandler( \
- [&](const InstanceLoId& id, const std::string& err) { _failed(id, err); }); \
- _closure->addSuccessHandler([&](const InstanceLoId& id, const bool& eos, \
- const PTransmitDataResult& result) { \
- Status s = Status(result.status()); \
- if (!s.ok()) { \
- _failed(id, \
- fmt::format("exchange req success but status isn't ok: {}", s.to_string())); \
- } else if (eos) { \
- _ended(id); \
- } else { \
- _send_rpc(id); \
- } \
- }); \
- { \
- SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(ExecEnv::GetInstance()->orphan_mem_tracker()); \
- if (enable_http_send_block(*brpc_request)) { \
- RETURN_IF_ERROR(transmit_block_http(_context->get_runtime_state(), _closure, \
- *brpc_request, request.channel->_brpc_dest_addr)); \
- } else { \
- transmit_block(*request.channel->_brpc_stub, _closure, *brpc_request); \
- } \
- } \
- if (request.BLOCK) { \
- brpc_request->release_block(); \
- } \
- QUEUE.pop();
-
if (!q.empty()) {
// If we have data to shuffle which is not broadcasted
- DO_RPC(q, block.get(), nullptr)
Review Comment:
I did this because some bugs occurs and the stack reported by ASAN is not accurate due to this macro. So I just remove this macro to help me find out what's wrong here. I will revert this PR after this.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org