github-actions[bot] commented on code in PR #29115:
URL: https://github.com/apache/doris/pull/29115#discussion_r1452433779


##########
be/src/vec/sink/load_stream_stub.cpp:
##########
@@ -332,8 +338,23 @@ Status LoadStreamStub::close_wait(int64_t timeout_ms) {
     return Status::OK();
 }
 
+void LoadStreamStub::cancel(Status reason) {
+    LOG(WARNING) << *this << " is cancelled because of " << reason;
+    {
+        std::lock_guard<bthread::Mutex> lock(_cancel_mutex);
+        _cancel_reason = reason;
+        _is_cancelled.store(true);
+    }
+    {
+        std::lock_guard<bthread::Mutex> lock(_close_mutex);
+        _is_closed.store(true);

Review Comment:
   warning: method '_encode_and_send' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
   static Status LoadStreamStub::_encode_and_send(PStreamHeader& header, 
std::span<const Slice> data) {
   ```
   



##########
be/src/vec/sink/load_stream_stub.h:
##########
@@ -197,19 +200,31 @@ class LoadStreamStub {
     Status _send_with_buffer(butil::IOBuf& buf, bool sync = false);
     Status _send_with_retry(butil::IOBuf& buf);
 
+    Status _check_cancel() {

Review Comment:
   warning: method '_check_cancel' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static Status _check_cancel() {
   ```
   



-- 
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-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to