sashapolo commented on code in PR #5242:
URL: https://github.com/apache/ignite-3/pull/5242#discussion_r1959530580


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/snapshot/outgoing/OutgoingSnapshot.java:
##########
@@ -100,30 +104,42 @@ public class OutgoingSnapshot {
     private volatile PartitionSnapshotMeta frozenMeta;
 
     /**
-     * {@link RowId}s for which the corresponding rows were sent out of order 
(relative to the order in which this
-     * snapshot sends rows), hence they must be skipped when sending rows 
normally.
+     * {@link RowId}s for which the corresponding rows were sent out of order 
(relative to the order in which this snapshot sends rows),
+     * hence they must be skipped when sending rows normally.
+     *
+     * <p>Multi-threaded access is guarded by {@link #mvOperationsLock}.
      */
-    private final Set<RowId> rowIdsToSkip = new ConcurrentHashSet<>();
+    private final Set<RowId> rowIdsToSkip = new HashSet<>();
 
     // TODO: IGNITE-18018 - manage queue size
     /**
-     * Rows that need to be sent out of order (relative to the order in which 
this snapshot sends rows).
-     * Versions inside rows are in oldest-to-newest order.
+     * Rows that need to be sent out of order (relative to the order in which 
this snapshot sends rows). Versions inside rows are in
+     * oldest-to-newest order.
+     *
+     * <p>Multi-threaded access is guarded by {@link #mvOperationsLock}.
      */
     private final Queue<SnapshotMvDataResponse.ResponseEntry> outOfOrderMvData 
= new ArrayDeque<>();
 
     /**
-     * Current delivery state of MV partition data. Can be {@code null} only 
if the delivery has not started yet.
+     * Current delivery state of MV partition data.
+     *
+     * <p>Multi-threaded access is guarded by {@link #mvOperationsLock}.
      */
     @Nullable
     private MvPartitionDeliveryState mvPartitionDeliveryState;
 
+    /**
+     * Cursor over TX data.
+     *
+     * <p>Inter-thread visibility is provided by accessing {@link 
#finishedTxData} in a correct order.

Review Comment:
   > Does it mean that happens-before is established because of network calls 
causality?
   
   No it means that happens-before is established by reading and writing the 
volatile variable in the correct order before or after accessing the 
non-volatile variable



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

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to