Warn if MaxKeepBlobBuffers > MaxConcurrentRequests.
authorTom Clegg <tom@tomclegg.ca>
Thu, 9 Apr 2020 20:58:36 +0000 (16:58 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 13 Apr 2020 15:21:08 +0000 (11:21 -0400)
No issue #

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

services/keepstore/command.go

index e0509393cff077e119b6ea7b975d10f90115d536..0593460a294db8097fc9549d871eb121ec41e0b1 100644 (file)
@@ -157,6 +157,9 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str
                h.Cluster.API.MaxConcurrentRequests = h.Cluster.API.MaxKeepBlobBuffers * 2
                h.Logger.Warnf("API.MaxConcurrentRequests <1 or not specified; defaulting to MaxKeepBlobBuffers * 2 == %d", h.Cluster.API.MaxConcurrentRequests)
        }
+       if h.Cluster.API.MaxConcurrentRequests > 0 && h.Cluster.API.MaxConcurrentRequests < h.Cluster.API.MaxKeepBlobBuffers {
+               h.Logger.Warnf("Possible configuration mistake: not useful to set API.MaxKeepBlobBuffers (%d) higher than API.MaxConcurrentRequests (%d)", h.Cluster.API.MaxKeepBlobBuffers, h.Cluster.API.MaxConcurrentRequests)
+       }
 
        if h.Cluster.Collections.BlobSigningKey != "" {
        } else if h.Cluster.Collections.BlobSigning {