shishkovilja commented on code in PR #12467:
URL: https://github.com/apache/ignite/pull/12467#discussion_r2469927949


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/IgniteDhtPartitionHistorySuppliersMap.java:
##########
@@ -94,15 +95,15 @@ public synchronized void put(UUID nodeId, int grpId, int 
partId, long cntr) {
         if (map == null)
             map = new HashMap<>();
 
-        Map<T2<Integer, Integer>, Long> nodeMap = map.get(nodeId);
+        PartitionReservationsMap nodeMap = map.get(nodeId);
 
         if (nodeMap == null) {
-            nodeMap = new HashMap<>();
+            nodeMap = new PartitionReservationsMap(new HashMap<>());
 
             map.put(nodeId, nodeMap);
         }
 
-        nodeMap.put(new T2<>(grpId, partId), cntr);
+        nodeMap.put(new GroupPartitionIdPair(grpId, partId), cntr);

Review Comment:
   So, this put is safe due to lazy init of inner map.



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