msokolov commented on a change in pull request #1592: URL: https://github.com/apache/lucene-solr/pull/1592#discussion_r443535745
########## 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: Is this some kind of tight inner loop where we need to be concerned about squeezing out every last gram of garbage? I'm not super familiar with this code, but it rather looks like a one-time initialization that will run once for each collection, so really it's a handful of objects we're talking about I think. Seems like a case of premature optimization, not really worth a warning from the compiler, IMO ---------------------------------------------------------------- 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