You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/10/20 23:49:40 UTC
[GitHub] [lucene-solr] muse-dev[bot] commented on a change in pull request #2010: SOLR-12182: Store URL scheme as replaceable parameter in state.json
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org