zhendongcmss commented on code in PR #7517:
URL: https://github.com/apache/apisix/pull/7517#discussion_r930550880


##########
apisix/plugins/clickhouse-logger.lua:
##########
@@ -72,11 +74,12 @@ end
 local function send_http_data(conf, log_message)
     local err_msg
     local res = true
-    local url_decoded = url.parse(conf.endpoint_addr)
+    local selected_endpoint_addr = 
conf.endpoint_addr[math_random(#conf.endpoint_addr)]
+    local url_decoded = url.parse(selected_endpoint_addr)
     local host = url_decoded.host
     local port = url_decoded.port
 
-    core.log.info("sending a batch logs to ", conf.endpoint_addr)
+    core.log.info("sending a batch logs to ", selected_endpoint_addr)

Review Comment:
   selected_endpoint_addr is ONLY one endpoint by randomly selected.



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

Reply via email to