Jackie-Jiang commented on code in PR #14235:
URL: https://github.com/apache/pinot/pull/14235#discussion_r1803811345


##########
pinot-spi/src/main/java/org/apache/pinot/spi/env/PinotConfiguration.java:
##########
@@ -170,8 +174,15 @@ public static List<Configuration> 
applyDynamicEnvConfig(List<Configuration> conf
       Map<String, String> environmentVariables) {
     return configurations.stream().peek(configuration -> {
       for (String dynamicEnvConfigVarName : 
configuration.getStringArray(ENV_DYNAMIC_CONFIG_KEY)) {
-        configuration.setProperty(dynamicEnvConfigVarName,
-            
environmentVariables.get(configuration.getString(dynamicEnvConfigVarName)));
+        if (configuration.getProperty(TEMPLATED_KEY) == null || 
!configuration.getProperty(TEMPLATED_KEY)
+            .equals(true)) {
+          configuration.setProperty(dynamicEnvConfigVarName,
+              
environmentVariables.get(configuration.getString(dynamicEnvConfigVarName)));
+          //Make sure the env variable is not re read twice by setting the 
property of Templated = true
+          configuration.setProperty(TEMPLATED_KEY, true);

Review Comment:
   We cannot set it here because it will prevent other configs to be set. You 
may add the checkout outside of the for loop



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to