membphis commented on a change in pull request #2001:
URL: https://github.com/apache/apisix/pull/2001#discussion_r466263277



##########
File path: apisix/balancer/ewma.lua
##########
@@ -140,30 +140,30 @@ local function pick_and_score(peers, k)
 end
 
 
--- slow_start_ewma is something we use to avoid sending too many requests
--- to the newly introduced endpoints. We currently use average ewma values
--- of existing endpoints.
-local function calculate_slow_start_ewma(self)
-    local total_ewma = 0
-    local endpoints_count = 0
-
-    for _, endpoint in pairs(self.peers) do
-        local endpoint_string = endpoint.address .. ":" .. endpoint.port
-        local ewma = shm_ewma:get(endpoint_string)
-
-        if ewma then
-            endpoints_count = endpoints_count + 1
-            total_ewma = total_ewma + ewma
-        end
-    end
+-- -- slow_start_ewma is something we use to avoid sending too many requests
+-- -- to the newly introduced endpoints. We currently use average ewma values
+-- -- of existing endpoints.
+-- local function calculate_slow_start_ewma(self)

Review comment:
       if it is useless, we need to remove it




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to