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


##########
be/src/http/ev_http_server.cpp:
##########
@@ -261,7 +315,19 @@ int EvHttpServer::on_header(struct evhttp_request* ev_req) 
{
         evhttp_request_set_chunked_cb(ev_req, on_chunked);
     }
 
+    {
+        std::lock_guard<std::mutex> l(g_conn_req_map_lock);
+        g_conn_req_map.erase(ev_req->evcon);
+        g_conn_req_map[ev_req->evcon] = request.get();
+    }
+
+    struct evhttp_connection * httpcon = evhttp_request_get_connection(ev_req);
+    evhttp_connection_set_closecb(httpcon, on_close, request.get());
     evhttp_request_set_on_free_cb(ev_req, on_free, request.release());
+    struct bufferevent* bufev = evhttp_connection_get_bufferevent(httpcon);
+    if (bufev)
+        bufferevent_enable(bufev, EV_READ);

Review Comment:
   warning: statement should be inside braces 
[readability-braces-around-statements]
   
   ```suggestion
       if (bufev) {
           bufferevent_enable(bufev, EV_READ);
   }
   ```
   



##########
be/src/runtime/exec_env_init.cpp:
##########
@@ -93,6 +98,11 @@ 
DEFINE_GAUGE_METRIC_PROTOTYPE_2ARG(send_batch_thread_pool_queue_size, MetricUnit
 DEFINE_GAUGE_METRIC_PROTOTYPE_2ARG(download_cache_thread_pool_thread_num, 
MetricUnit::NOUNIT);
 DEFINE_GAUGE_METRIC_PROTOTYPE_2ARG(download_cache_thread_pool_queue_size, 
MetricUnit::NOUNIT);
 
+std::map<UniqueId, StreamLoadPipe*> g_streamloadpipes;
+std::mutex g_streamloadpipes_lock;
+extern std::map<UniqueId, StreamLoadPipe*> g_streamloadpipes;
+extern std::mutex g_streamloadpipes_lock;

Review Comment:
   warning: redundant 'g_streamloadpipes_lock' declaration 
[readability-redundant-declaration]
   
   ```suggestion
   
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/runtime/exec_env_init.cpp:101:** previously declared here
   ```cpp
   std::mutex g_streamloadpipes_lock;
              ^
   ```
   
   </details>
   



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