You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/08/04 08:33:22 UTC

[GitHub] [ignite] alex-plekhanov commented on a diff in pull request #10140: IGNITE-17316 Add pluggable affinity fucntion to the thin client partition awareness feature

alex-plekhanov commented on code in PR #10140:
URL: https://github.com/apache/ignite/pull/10140#discussion_r937503805


##########
modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientCacheAffinityContext.java:
##########
@@ -19,29 +19,45 @@
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Function;
 import org.apache.ignite.IgniteBinary;
+import org.apache.ignite.client.ClientPartitionAwarenessMapper;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.util.GridConcurrentHashSet;
+import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
  * Client cache partition awareness context.
  */
 public class ClientCacheAffinityContext {
+    /** If a factory needs to be removed. */
+    private static final long REMOVED_TS = 0;
+
     /** Binary data processor. */
     private final IgniteBinary binary;
 
+    /** Factory for each cache id to produce key to partition mapping functions. */
+    private final Map<Integer, ClientPartitionAwarenessMapperHolder> cacheKeyMapperFactoryMap = new HashMap<>();

Review Comment:
   Memory leak here. This map is never cleaned, only appended. 



-- 
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-unsubscribe@ignite.apache.org

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