mirror of
https://github.com/minio/minio
synced 2024-09-06 00:37:25 +00:00
config: fix duplication of replication priority key (#17014)
This commit is contained in:
parent
6877578bbc
commit
d350654aee
|
@ -602,6 +602,17 @@ var renamedSubsys = map[string]string{
|
|||
// Add future sub-system renames
|
||||
}
|
||||
|
||||
const ( // deprecated keys
|
||||
apiReplicationWorkers = "replication_workers"
|
||||
apiReplicationFailedWorkers = "replication_failed_workers"
|
||||
)
|
||||
|
||||
// map of subsystem to deleted keys
|
||||
var deletedSubSysKeys = map[string][]string{
|
||||
APISubSys: {apiReplicationWorkers, apiReplicationFailedWorkers},
|
||||
// Add future sub-system deleted keys
|
||||
}
|
||||
|
||||
// Merge - merges a new config with all the
|
||||
// missing values for default configs,
|
||||
// returns a config.
|
||||
|
@ -632,9 +643,16 @@ func (c Config) Merge() Config {
|
|||
}
|
||||
subSys = rnSubSys
|
||||
}
|
||||
// Delete deprecated keys for subsystem if any
|
||||
if keys, ok := deletedSubSysKeys[subSys]; ok {
|
||||
for _, key := range keys {
|
||||
ckvs.Delete(key)
|
||||
}
|
||||
}
|
||||
cp[subSys][tgt] = ckvs
|
||||
}
|
||||
}
|
||||
|
||||
return cp
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue