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.
This commit is contained in:
Klaus Post 2022-03-22 11:28:54 -07:00 committed by GitHub
parent 7bc1f986e8
commit 50577e2bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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. // Only replace if needed.
// Existing requests will use the previous limit, // Existing requests will use the previous limit,
// but new requests will use the new limit. // but new requests will use the new limit.