s1monw commented on a change in pull request #637: LUCENE-8754: Prevent 
ConcurrentModificationException in SegmentInfo
URL: https://github.com/apache/lucene-solr/pull/637#discussion_r272983432
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java
 ##########
 @@ -68,7 +69,7 @@
 
   private Map<String,String> diagnostics;
   
-  private final Map<String,String> attributes;
+  private Map<String,String> attributes;
 
 Review comment:
   I don't think this is helping anybody. This entire class is mutable and 
accessed without locking. I think we are making the situation as good as it 
gets without lock since we always safe-publish with a new instance. There are 
many other things like `maxDoc` and `isCompoundFile` that have the same issues.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to