yiguolei commented on code in PR #19258:
URL: https://github.com/apache/doris/pull/19258#discussion_r1185690510
##########
be/src/http/action/stream_load_2pc.cpp:
##########
@@ -98,4 +98,18 @@ std::string StreamLoad2PCAction::get_success_info(const
std::string txn_id,
return s.GetString();
}
+void StreamLoad2PCAction::free_handler_ctx(void* param) {
+ StreamLoadContext* ctx = (StreamLoadContext*)param;
+ if (ctx == nullptr) {
+ return;
+ }
+ // sender is gone, make receiver know it
+ if (ctx->body_sink != nullptr) {
+ ctx->body_sink->cancel("sender is gone");
+ }
+ if (ctx->unref()) {
Review Comment:
please do not manage reference number yourself, use shared ptr or unique ptr
here.
--
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]