From d4aac7cd725f73cd4629ace43555647147a63619 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 18 Mar 2024 15:25:32 -0700 Subject: [PATCH] add deprecated expiry_workers to be ignored (#19289) avoids error during upgrades such as ``` API: SYSTEM() Time: 19:19:22 UTC 03/18/2024 DeploymentID: 24e4b574-b28d-4e94-9bfa-03c363a600c2 Error: Invalid api configuration: found invalid keys (expiry_workers=100 ) for 'api' sub-system, use 'mc admin config reset myminio api' to fix invalid keys (*fmt.wrapError) 11: internal/logger/logger.go:260:logger.LogIf() ... ``` --- internal/config/api/api.go | 2 +- internal/config/errors.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/config/api/api.go b/internal/config/api/api.go index 04ec7fbe6..e8bee1ded 100644 --- a/internal/config/api/api.go +++ b/internal/config/api/api.go @@ -171,7 +171,6 @@ type Config struct { ReplicationPriority string `json:"replication_priority"` ReplicationMaxWorkers int `json:"replication_max_workers"` TransitionWorkers int `json:"transition_workers"` - ExpiryWorkers int `json:"expiry_workers"` StaleUploadsCleanupInterval time.Duration `json:"stale_uploads_cleanup_interval"` StaleUploadsExpiry time.Duration `json:"stale_uploads_expiry"` DeleteCleanupInterval time.Duration `json:"delete_cleanup_interval"` @@ -200,6 +199,7 @@ func LookupConfig(kvs config.KVS) (cfg Config, err error) { "extend_list_cache_life", apiReplicationWorkers, apiReplicationFailedWorkers, + "expiry_workers", } disableODirect := env.Get(EnvAPIDisableODirect, kvs.Get(apiDisableODirect)) == config.EnableOn diff --git a/internal/config/errors.go b/internal/config/errors.go index 24a2d0042..751152081 100644 --- a/internal/config/errors.go +++ b/internal/config/errors.go @@ -224,11 +224,6 @@ Examples: "", "MINIO_API_TRANSITION_WORKERS: should be >= GOMAXPROCS/2", ) - ErrInvalidExpiryWorkersValue = newErrFn( - "Invalid value for expiry workers", - "", - "MINIO_API_EXPIRY_WORKERS: should be between 1 and 500", - ) ErrInvalidBatchKeyRotationWorkersWait = newErrFn( "Invalid value for batch key rotation workers wait", "Please input a non-negative duration",