poojanilangekar commented on code in PR #1959:
URL: https://github.com/apache/polaris/pull/1959#discussion_r2190568285


##########
polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfigurationStore.java:
##########
@@ -99,7 +99,25 @@ public interface PolarisConfigurationStore {
    */
   default <T> @Nonnull T getConfiguration(
       @Nonnull RealmContext realmContext, PolarisConfiguration<T> config) {
-    T result = getConfiguration(realmContext, config.key, config.defaultValue);
+    T result = getConfiguration(realmContext, config.key);
+
+    if (result == null && config.hasLegacyKeys()) {
+      for (String legacyKey : config.legacyKeys) {
+        result = getConfiguration(realmContext, legacyKey);
+        if (result != null) {
+          LOGGER.warn(
+              "Legacy configuration key '{}' is in use. Please use '{}' 
instead.",
+              legacyKey,
+              config.key);
+          break;

Review Comment:
   Regarding (1), I don't think that is accurate, even with the default key, 
there is an [order of 
precedence](https://quarkus.io/guides/config-reference#configuration-sources) 
in which properties are applied.  When multiple keys are found, Quarkus picks 
the first property that is encounters. So I'm unsure why we'd want to apply 
multiple legacy keys. Unless you're suggesting simply logging multiple legacy 
keys while only accepting the fist legacy key. Please let me know. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to