ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] pavlukhin commented on a change in pull request #6819: IGNITE-12116 Support array as key for caches.
Date Wed, 28 Aug 2019 21:37:30 GMT
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

Mime
View raw message