mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Fix ilm config at startup (#19189)
Remove api.expiration_workers config setting which was inadvertently left behind. Per review comment https://github.com/minio/minio/pull/18926, expiration_workers can be configured via ilm.expiration_workers.
This commit is contained in:
committed by
GitHub
parent
e385f54185
commit
b69bcdcdc4
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015-2021 MinIO, Inc.
|
||||
// Copyright (c) 2015-2024 MinIO, Inc.
|
||||
//
|
||||
// This file is part of MinIO Object Storage stack
|
||||
//
|
||||
@@ -374,7 +374,7 @@ func (es *expiryState) Worker(input <-chan expiryOp) {
|
||||
}
|
||||
|
||||
func initBackgroundExpiry(ctx context.Context, objectAPI ObjectLayer) {
|
||||
globalExpiryState = newExpiryState(ctx, objectAPI, globalAPIConfig.getExpiryWorkers())
|
||||
globalExpiryState = newExpiryState(ctx, objectAPI, globalILMConfig.getExpirationWorkers())
|
||||
}
|
||||
|
||||
// newerNoncurrentTask encapsulates arguments required by worker to expire objects
|
||||
@@ -438,6 +438,10 @@ func newTransitionState(ctx context.Context) *transitionState {
|
||||
// of transition workers.
|
||||
func (t *transitionState) Init(objAPI ObjectLayer) {
|
||||
n := globalAPIConfig.getTransitionWorkers()
|
||||
// Prefer ilm.transition_workers over now deprecated api.transition_workers
|
||||
if tw := globalILMConfig.getTransitionWorkers(); tw > 0 {
|
||||
n = tw
|
||||
}
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user