Warn if MaxKeepBlobBuffers > MaxConcurrentRequests.
authorTom Clegg <tom@tomclegg.ca>
Thu, 9 Apr 2020 20:58:36 +0000 (16:58 -0400)
committerTom Clegg <tom@tomclegg.ca>
Thu, 9 Apr 2020 20:58:36 +0000 (16:58 -0400)
No issue #

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

services/keepstore/command.go

index be2639773650fe5312ef80759cc427bd5cf0c14c..ea08cf9775440ae67245b5c5f8143a63bcae6a04 100644 (file)
@@ -161,6 +161,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 {