Mmuzaf commented on code in PR #10140:
URL: https://github.com/apache/ignite/pull/10140#discussion_r923249097
##########
modules/core/src/main/java/org/apache/ignite/configuration/ClientConfiguration.java:
##########
@@ -111,6 +115,25 @@ public final class ClientConfiguration implements
Serializable {
*/
private boolean partitionAwarenessEnabled = true;
+ /**
+ * This factory is used only when the partition awareness thin client
feature is enabled. By default, on a new cache
+ * the RendezvousAffinityFunction will be used for calculating mappings
'key-to-partition' and 'partition-to-node'. The
+ * thin client will keep all 'partitions-to-node' mappings up to date when
each cache put/get request occurs and the
+ * 'key-to-partition' mapping will also be calculated on the client side.
+ *
+ * The case described above will not be possible (and in turn partition
awareness won't work) when a custom {@link AffinityFunction} or
+ * a {@link AffinityKeyMapper} was previously used for a cache creation.
The affinity function factory is used to solve this issue.
+ * All 'partition-to-node' mappings will still be requested from a server
node, however, if a custom affinity function or a custom
+ * affinity key mapper was used the affinity function produced by this
factory will calculate mapping a key to a partition.
+ *
+ * These key to partition mapping functions produced by the factory are
used only for local calculations, they will not
+ * be passed to a server node.
+ *
+ * This factory accepts as parameters a cache name and the number of cache
partitions received from a server node and produces
+ * key to partition mapping functions.
+ */
+ private BiFunction<String, Integer, ToIntFunction<Object>>
partitionAwarenessMapperFactory;
Review Comment:
Fixed.
--
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]