AMashenkov commented on code in PR #2710:
URL: https://github.com/apache/ignite-3/pull/2710#discussion_r1372699515


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/mapping/MappingServiceImpl.java:
##########
@@ -258,4 +271,37 @@ private static List<Fragment> replace(
 
         return newFragments;
     }
+
+    /**
+     * Holder for topology snapshots that guarantees monotonically increasing 
versions.
+     */
+    class LogicalTopologyHolder {
+        private volatile List<String> nodes = List.of();

Review Comment:
   > why volatile used ?
   
   Topology changes leads write to the field inside a synchronized block,
   however, mapper service reads the field without obtaining a lock.
   
   > i.e. can we obtain situation when onNodeLeft and map are called in 
parallel ?
   
   yes



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to