Unexpected config change: Lower log level and add explanation
@@ -204,9 +204,10 @@ public abstract class ConfigSubscription<T extends ConfigInstance> {
if (previousConfig != null && configChanged) {
SnippetGenerator generator = new SnippetGenerator();
int sizeHint = 500;
- log.log(Level.WARNING, "Config has changed unexpectedly for " + key + ", generation " + generation +
+ log.log(Level.INFO, "Config has changed unexpectedly for " + key + ", generation " + generation +
", config in state :" + generator.makeSnippet(previousConfig.toString(), sizeHint) + ", new config: " +
- generator.makeSnippet(config.toString(), sizeHint));
+ generator.makeSnippet(config.toString(), sizeHint) +
+ ". This might happen if a feature flag is changed when upgrading config servers (either in code or with overrides)");
}
this.config.set(new ConfigState<>(true, generation, applyOnRestart, configChanged, config, payloadChecksums));
}
