megancarey commented on a change in pull request #1592: URL: https://github.com/apache/lucene-solr/pull/1592#discussion_r443788954
########## File path: solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java ########## @@ -351,10 +340,10 @@ public void simSetClusterState(ClusterState initialState) throws Exception { // DocCollection will be created later collectionsStatesRef.put(dc.getName(), new CachedCollectionRef(dc.getName(), dc.getZNodeVersion())); collProperties.computeIfAbsent(dc.getName(), name -> new ConcurrentHashMap<>()).putAll(dc.getProperties()); - opDelays.computeIfAbsent(dc.getName(), Utils.NEW_HASHMAP_FUN).putAll(defaultOpDelays); + opDelays.computeIfAbsent(dc.getName(), o -> new HashMap<String,Long>()).putAll(defaultOpDelays); Review comment: Should we be using `map.putIfAbsent` instead of compute? The value mapped to the key doesn't actually use the key, so I don't believe we need to use `computeIfAbsent`/lambda functions at all. I'll try this out and run tests to see if that's an acceptable option, and report back in a bit. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org