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 2019/08/28 21:37:30 UTC

[GitHub] [ignite] pavlukhin commented on a change in pull request #6819: IGNITE-12116 Support array as key for caches.

pavlukhin commented on a change in pull request #6819: IGNITE-12116 Support array as key for caches.
URL: https://github.com/apache/ignite/pull/6819#discussion_r318804073
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
 ##########
 @@ -77,6 +78,9 @@
     @Override public Object affinityKey(Object key) {
         GridArgumentCheck.notNull(key, "key");
 
+        if(key.getClass().isArray())
+            return IgniteUtils.hashCode(key);
 
 Review comment:
   @ingvard It is puzzling for me why an _affinity key_ for an array is calculated as a _hash_ for an array content? Could you please elaborate?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services