muse-dev[bot] commented on a change in pull request #2010:
URL: https://github.com/apache/lucene-solr/pull/2010#discussion_r508905260



##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -798,7 +799,11 @@ public boolean isClosed() {
   }
 
   public String getLeaderUrl(String collection, String shard, int timeout) 
throws InterruptedException {
-    ZkCoreNodeProps props = new ZkCoreNodeProps(getLeaderRetry(collection, 
shard, timeout));
+    Replica replica = getLeaderRetry(collection, shard, timeout);

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Read/Write race. Non-private method 
`ZkStateReader.getLeaderUrl(...)` indirectly reads without synchronization from 
`cloud.UrlScheme.INSTANCE.urlScheme`. Potentially races with write in method 
`ZkStateReader.forciblyRefreshAllClusterStateSlow()`.
    Reporting because another access to the same memory occurs on a background 
thread, although this access may not.




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

Reply via email to