yiguolei commented on code in PR #67755:
URL: https://github.com/apache/doris/pull/67755#discussion_r3975259106
##########
be/src/exec/exchange/vdata_stream_sender.h:
##########
@@ -163,12 +163,9 @@ class Channel {
std::shared_ptr<ExchangeSendCallback<PTransmitDataResult>>
get_send_callback(RpcInstance* ins,
bool eos) {
- // here we reuse the callback because it's re-construction may be
expensive due to many parameters' capture
- if (!_send_callback) {
- _send_callback =
ExchangeSendCallback<PTransmitDataResult>::create_shared();
- } else {
- _send_callback->cntl_->Reset();
- }
+ // Keep the latest callback alive because AutoReleaseClosure
intentionally holds only a
+ // weak_ptr. See ExchangeSinkBuffer::_send_rpc() for the callback
replacement sequence.
+ _send_callback =
ExchangeSendCallback<PTransmitDataResult>::create_shared();
Review Comment:
not a problem
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]