diff --git a/internal/config/config.go b/internal/config/config.go index 92a597bf4..d842d2243 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -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 }