13647: Rename MaxKeepBlockBuffers -> MaxKeepBlobBuffers
authorTom Clegg <tclegg@veritasgenetics.com>
Fri, 13 Sep 2019 19:50:48 +0000 (15:50 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Fri, 13 Sep 2019 19:50:48 +0000 (15:50 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

doc/install/install-keepstore.html.textile.liquid
lib/config/config.default.yml
lib/config/deprecated_keepstore.go
lib/config/deprecated_keepstore_test.go
lib/config/export.go
lib/config/generated_config.go
sdk/go/arvados/config.go
services/keepstore/command.go
services/keepstore/handler_test.go

index 92fd91eb02d1544339f6dfea46262f772f5fe43d..5d0e2df8013ff423ed41274d34da8227e0506c9f 100644 (file)
@@ -66,7 +66,7 @@ Add or update the following sections of @/etc/arvados/config.yml@ as needed. Ref
         InternalURLs:
           "http://<span class="userinput">keep0.uuid_prefix.your.domain</span>:25107/": {}
     API:
-      MaxKeepBlockBuffers: 128
+      MaxKeepBlobBuffers: 128
 </code></pre>
 </notextile>
 
index c1d79ff27a6abab2a2b2aa87c3f07d5b17863a0e..a083094df4ce493ad3238d0441ead954187d31de 100644 (file)
@@ -184,7 +184,7 @@ Clusters:
 
       # Maximum number of 64MiB memory buffers per keepstore server
       # process, or 0 for no limit.
-      MaxKeepBlockBuffers: 128
+      MaxKeepBlobBuffers: 128
 
       # API methods to disable. Disabled methods are not listed in the
       # discovery document, and respond 404 to all requests.
index dfd44a0ef225a74dfb2c234a052717430a5d8933..67ead7bce2daa18727f31d5f9276cd624931430e 100644 (file)
@@ -160,8 +160,8 @@ func (ldr *Loader) loadOldKeepstoreConfig(cfg *arvados.Config) error {
        if v := oc.LogFormat; v != nil && *v != cluster.SystemLogs.Format {
                cluster.SystemLogs.Format = *v
        }
-       if v := oc.MaxBuffers; v != nil && *v != cluster.API.MaxKeepBlockBuffers {
-               cluster.API.MaxKeepBlockBuffers = *v
+       if v := oc.MaxBuffers; v != nil && *v != cluster.API.MaxKeepBlobBuffers {
+               cluster.API.MaxKeepBlobBuffers = *v
        }
        if v := oc.MaxRequests; v != nil && *v != cluster.API.MaxConcurrentRequests {
                cluster.API.MaxConcurrentRequests = *v
index 4891ceb8a6c1910e453c5d232bd237ab25874e97..0948e2e2f089b98376bece1f335e78ee3ada8a2c 100644 (file)
@@ -121,7 +121,7 @@ Clusters:
       Format: text
       LogLevel: debug
     API:
-      MaxKeepBlockBuffers: 1234
+      MaxKeepBlobBuffers: 1234
       MaxConcurrentRequests: 2345
     Collections:
       BlobSigningTTL: 123m
index f545abc14f71aebb36db2f90d6c1520cf40855ab..8df561c00fa0fce082ee9635f7f3fbf1ef067936 100644 (file)
@@ -66,7 +66,7 @@ var whitelist = map[string]bool{
        "API.MaxConcurrentRequests":                    false,
        "API.MaxIndexDatabaseRead":                     false,
        "API.MaxItemsPerResponse":                      true,
-       "API.MaxKeepBlockBuffers":                      false,
+       "API.MaxKeepBlobBuffers":                       false,
        "API.MaxRequestAmplification":                  false,
        "API.MaxRequestSize":                           true,
        "API.RailsSessionSecretToken":                  false,
index ecc2e8ea010630e857766a2e785281a03b8a8a09..117f189d9a533a023c77182535f5f8784461657d 100644 (file)
@@ -190,7 +190,7 @@ Clusters:
 
       # Maximum number of 64MiB memory buffers per keepstore server
       # process, or 0 for no limit.
-      MaxKeepBlockBuffers: 128
+      MaxKeepBlobBuffers: 128
 
       # API methods to disable. Disabled methods are not listed in the
       # discovery document, and respond 404 to all requests.
index a058f6181bba1f7b8bb2cd9e5b2703f78be54aae..4a7221f053e6069135c26c70421abeead711d7f6 100644 (file)
@@ -82,7 +82,7 @@ type Cluster struct {
                MaxIndexDatabaseRead           int
                MaxItemsPerResponse            int
                MaxConcurrentRequests          int
-               MaxKeepBlockBuffers            int
+               MaxKeepBlobBuffers             int
                MaxRequestAmplification        int
                MaxRequestSize                 int
                RailsSessionSecretToken        string
index df279687d0d5e370e42e6ee0d9445f5506f14ecb..51031d3607e9ac810e083832c763be7ff423dfb0 100644 (file)
@@ -48,7 +48,7 @@ func runCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.W
 func convertKeepstoreFlagsToServiceFlags(args []string, lgr logrus.FieldLogger) ([]string, bool) {
        flags := flag.NewFlagSet("", flag.ContinueOnError)
        flags.String("listen", "", "Services.Keepstore.InternalURLs")
-       flags.Int("max-buffers", 0, "API.MaxKeepBlockBuffers")
+       flags.Int("max-buffers", 0, "API.MaxKeepBlobBuffers")
        flags.Int("max-requests", 0, "API.MaxConcurrentRequests")
        flags.Bool("never-delete", false, "Collections.BlobTrash")
        flags.Bool("enforce-permissions", false, "Collections.BlobSigning")
@@ -148,14 +148,14 @@ func newHandlerOrErrorHandler(ctx context.Context, cluster *arvados.Cluster, tok
 func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token string, reg *prometheus.Registry, serviceURL arvados.URL) error {
        h.Cluster = cluster
        h.Logger = ctxlog.FromContext(ctx)
-       if h.Cluster.API.MaxKeepBlockBuffers <= 0 {
+       if h.Cluster.API.MaxKeepBlobBuffers <= 0 {
                return fmt.Errorf("MaxBuffers must be greater than zero")
        }
-       bufs = newBufferPool(h.Logger, h.Cluster.API.MaxKeepBlockBuffers, BlockSize)
+       bufs = newBufferPool(h.Logger, h.Cluster.API.MaxKeepBlobBuffers, BlockSize)
 
        if h.Cluster.API.MaxConcurrentRequests < 1 {
-               h.Cluster.API.MaxConcurrentRequests = h.Cluster.API.MaxKeepBlockBuffers * 2
-               h.Logger.Warnf("MaxRequests <1 or not specified; defaulting to MaxKeepBlockBuffers * 2 == %d", h.Cluster.API.MaxConcurrentRequests)
+               h.Cluster.API.MaxConcurrentRequests = h.Cluster.API.MaxKeepBlobBuffers * 2
+               h.Logger.Warnf("MaxRequests <1 or not specified; defaulting to MaxKeepBlobBuffers * 2 == %d", h.Cluster.API.MaxConcurrentRequests)
        }
 
        if h.Cluster.Collections.BlobSigningKey != "" {
index 251ad0a1df2e355a5079bdd6db7b5e56419243bd..299460297f877635638f431f4bd58904a4ad2124 100644 (file)
@@ -947,7 +947,7 @@ func (s *HandlerSuite) TestPutHandlerNoBufferleak(c *check.C) {
 
        ok := make(chan bool)
        go func() {
-               for i := 0; i < s.cluster.API.MaxKeepBlockBuffers+1; i++ {
+               for i := 0; i < s.cluster.API.MaxKeepBlobBuffers+1; i++ {
                        // Unauthenticated request, no server key
                        // => OK (unsigned response)
                        unsignedLocator := "/" + TestHash
@@ -1039,7 +1039,7 @@ func (s *HandlerSuite) TestGetHandlerNoBufferLeak(c *check.C) {
 
        ok := make(chan bool)
        go func() {
-               for i := 0; i < s.cluster.API.MaxKeepBlockBuffers+1; i++ {
+               for i := 0; i < s.cluster.API.MaxKeepBlobBuffers+1; i++ {
                        // Unauthenticated request, unsigned locator
                        // => OK
                        unsignedLocator := "/" + TestHash