rpuch commented on code in PR #5612: URL: https://github.com/apache/ignite-3/pull/5612#discussion_r2039764925
########## modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java: ########## @@ -3069,13 +3068,15 @@ public void setStreamerReceiverRunner(StreamerReceiverRunner runner) { } public Set<TableImpl> zoneTables(int zoneId) { - return tablesPerZone.computeIfAbsent(zoneId, id -> new HashSet<>()); + // Using a concurrent set as a value as it can be read (and iterated over) without any synchronization by external callers. + return tablesPerZone.computeIfAbsent(zoneId, id -> ConcurrentHashMap.newKeySet()); Review Comment: No, we don't rely on set 'sharedness'. I agree, `getOrDefault()` is better, I changed the code. I also made another change: public `zoneTables()` now makes a defensive copy. -- 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