brumi1024 commented on code in PR #8801:
URL: https://github.com/apache/hadoop/pull/8801#discussion_r4243505587


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AutoCreatedQueueTemplate.java:
##########
@@ -106,12 +107,12 @@ public void 
setTemplateEntriesForChild(CapacitySchedulerConfiguration conf,
       return;
     }
 
-    ConfigurationProperties configurationProperties =
-        conf.getConfigurationProperties();
-
-    // Get all properties that are explicitly set
-    Set<String> alreadySetProps = configurationProperties
-        .getPropertiesWithPrefix(getQueuePrefix(childQueuePath)).keySet();
+    // Get all properties that are explicitly set. The snapshot is taken
+    // before any template entry is written, so entries written for this or
+    // other dynamic queues do not count as explicitly set.
+    Set<String> alreadySetProps = conf.getConfigSnapshot()

Review Comment:
   Agreed, though trunk had the same hidden ordering with the lazily built 
index. TestConfigSnapshotTemplateWrites already catches a refresh during queue 
setup: the template's user limit factor of 3 would be skipped and the queue 
would report -1. I noted this in the test javadoc. The proper fix is to track 
template values separately, which the resolver in YARN-12015 (has no PR yet, as 
it depends on these existing PRs) does, so I'd rather remove the dependency 
there.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to