Author: frm
Date: Tue Apr 11 11:43:09 2017
New Revision: 1790958

URL: http://svn.apache.org/viewvc?rev=1790958&view=rev
Log:
OAK-6052 - Clarify the immutability properties of the TAR reader linked list

Modified:
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarFiles.java

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarFiles.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarFiles.java?rev=1790958&r1=1790957&r2=1790958&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarFiles.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/TarFiles.java
 Tue Apr 11 11:43:09 2017
@@ -266,6 +266,11 @@ class TarFiles implements Closeable {
      * the linked list is immutable. Thus, you need to to hold {@link #lock}
      * while reading the value of the reference, but you can release it before
      * iterating through the list.
+     * <p>
+     * Please note that while the linked list is immutable, the pointer to it
+     * (namely this instance variable) is not itself immutable. This reference
+     * must be kept consistent with {@link #writer}, and this is the reason why
+     * it's necessary to hold a lock while accessing this variable.
      */
     private Node readers;
 


Reply via email to