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



##########
File path: solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
##########
@@ -100,6 +101,15 @@ public void writeMap(EntryWriter ew) throws IOException {
     currentPlugins.forEach(ew.getBiConsumer());
   }
 
+  @Override
+  public void close() throws IOException {
+    currentPlugins.values().forEach(apiInfo -> {

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Read/Write race. Non-private method 
`ContainerPluginsRegistry.close()` reads without synchronization from container 
`this.currentPlugins` via call to `Map.values()`. Potentially races with write 
in method `ContainerPluginsRegistry.refresh()`.
    Reporting because another access to the same memory occurs on a background 
thread, although this access may not.

##########
File path: solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
##########
@@ -100,6 +101,15 @@ public void writeMap(EntryWriter ew) throws IOException {
     currentPlugins.forEach(ew.getBiConsumer());

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Read/Write race. Non-private method 
`ContainerPluginsRegistry.writeMap(...)` reads without synchronization from 
container `this.currentPlugins` via call to `Map.forEach(...)`. Potentially 
races with write in method `ContainerPluginsRegistry.refresh()`.
    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