From 50577e2bd2285ef7d1426f175ab982ff875c3fea Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Tue, 22 Mar 2022 11:28:54 -0700 Subject: [PATCH] Allow adjusting request pool both ways (#14609) When reloading a dynamic config allow the request pool to scale both ways. Existing requests hold on to the previous pool, so they will pop the elements from that. --- cmd/handler-api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/handler-api.go b/cmd/handler-api.go index ac8756b88..688cc83e9 100644 --- a/cmd/handler-api.go +++ b/cmd/handler-api.go @@ -127,7 +127,7 @@ func (t *apiConfig) init(cfg api.Config, setDriveCounts []int) { } } - if cap(t.requestsPool) < apiRequestsMaxPerNode { + if cap(t.requestsPool) != apiRequestsMaxPerNode { // Only replace if needed. // Existing requests will use the previous limit, // but new requests will use the new limit.