Userwhite commented on code in PR #53144:
URL: https://github.com/apache/doris/pull/53144#discussion_r2203747341


##########
be/src/http/http_request.h:
##########
@@ -79,7 +84,27 @@ class HttpRequest {
 
     const char* remote_host() const;
 
+    void mark_send_reply(SendReplyType type = REPLY_ASYNC) {
+        _send_reply_type = type;
+    }
+
+    void finish_send_reply() {
+        promise.set_value(true);
+    }
+
+    void wait_finish_send_reply() {
+        if (_send_reply_type == REPLY_SYNC) {
+            return;
+        }
+
+        auto status = _futrue.wait_for(std::chrono::seconds(600));
+        if (status != std::future_status::ready) {
+            LOG(WARNING) << "wait for send reply timeout, " << 
this->debug_string();
+        }
+    }
+
 private:
+    SendReplyType _send_reply_type = REPLY_SYNC;

Review Comment:
   还有其他 HttpAction 会用到,他们需要默认是 SYNC 的。



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