dsmiley commented on code in PR #1256:
URL: https://github.com/apache/solr/pull/1256#discussion_r1060214019


##########
solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java:
##########
@@ -147,6 +147,8 @@ public void beforeTest() {
   protected volatile ChaosMonkey chaosMonkey;
 
   protected Map<String, CloudJettyRunner> shardToLeaderJetty = new 
ConcurrentHashMap<>();
+  protected volatile Map<String, CloudSolrClient> solrClientForCollectionCache 
=

Review Comment:
   `volatile` has to do with ensuring threads can read it if it is written to 
by another thread.  This refers to the field itself, not what may be inside 
(i.e. it is to the actual field reference to CHM, not what's *in* CHM).  Since 
you set a value at the declaration and never set it anywhere else, just remove 
"volatile" and make it final as well to communicate this fact.



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