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")
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 {
- return fmt.Errorf("MaxBuffers must be greater than zero")
+ if h.Cluster.API.MaxKeepBlobBuffers <= 0 {
+ return fmt.Errorf("API.MaxKeepBlobBuffers 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("API.MaxConcurrentRequests <1 or not specified; defaulting to MaxKeepBlobBuffers * 2 == %d", h.Cluster.API.MaxConcurrentRequests)
}
if h.Cluster.Collections.BlobSigningKey != "" {
// Initialize the trashq and workers
h.trashq = NewWorkQueue()
for i := 0; i < 1 || i < h.Cluster.Collections.BlobTrashConcurrency; i++ {
- go RunTrashWorker(h.volmgr, h.Cluster, h.trashq)
+ go RunTrashWorker(h.volmgr, h.Logger, h.Cluster, h.trashq)
}
// Set up routes and metrics