mirror of
https://github.com/minio/minio.git
synced 2025-01-24 13:13:16 -05: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
|
// 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
|
// Merge - merges a new config with all the
|
||||||
// missing values for default configs,
|
// missing values for default configs,
|
||||||
// returns a config.
|
// returns a config.
|
||||||
@ -632,9 +643,16 @@ func (c Config) Merge() Config {
|
|||||||
}
|
}
|
||||||
subSys = rnSubSys
|
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
|
cp[subSys][tgt] = ckvs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cp
|
return cp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user