HappenLee commented on code in PR #20278:
URL: https://github.com/apache/doris/pull/20278#discussion_r1212119221


##########
be/src/vec/sink/vdata_stream_sender.h:
##########
@@ -525,11 +492,23 @@ class PipChannel final : public Channel {
         _buffer->register_sink(_fragment_instance_id);
     }
 
+    pipeline::SelfDeleteClosure<PTransmitDataResult>* get_closure(
+            InstanceLoId id, bool eos, vectorized::BroadcastPBlockHolder* 
data) {
+        if (!_closure) {

Review Comment:
   before call the method we already get the lock



##########
be/src/vec/sink/vdata_stream_sender.h:
##########
@@ -525,11 +492,23 @@ class PipChannel final : public Channel {
         _buffer->register_sink(_fragment_instance_id);
     }
 
+    pipeline::SelfDeleteClosure<PTransmitDataResult>* get_closure(
+            InstanceLoId id, bool eos, vectorized::BroadcastPBlockHolder* 
data) {
+        if (!_closure) {
+            _closure = new pipeline::SelfDeleteClosure<PTransmitDataResult>();
+        } else {
+            _closure->cntl.Reset();
+        }
+        _closure->init(id, eos, data);
+        return _closure;
+    }
+
 private:
     friend class VDataStreamSender;
 
     pipeline::ExchangeSinkBuffer* _buffer = nullptr;
     bool _eos_send = false;
+    pipeline::SelfDeleteClosure<PTransmitDataResult>* _closure = nullptr;

Review Comment:
   ok



-- 
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]

Reply via email to