You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/05 16:59:20 UTC
[jira] [Commented] (IGNITE-3263) Affinity function must check for
null keys
[ https://issues.apache.org/jira/browse/IGNITE-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409718#comment-15409718 ]
ASF GitHub Bot commented on IGNITE-3263:
----------------------------------------
GitHub user samaitra opened a pull request:
https://github.com/apache/ignite/pull/926
IGNITE-3263 Affinity function must check for null keys
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/samaitra/ignite IGNITE-3263
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/926.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #926
----
commit 4a09b4598b8a0210af45bf738d634768fa9619a3
Author: samaitra <sa...@gmail.com>
Date: 2016-08-05T16:49:28Z
IGNITE-3263 Affinity function must check for null keys
commit 88d85f5572df6040e924a7024c9906238a005392
Author: samaitra <sa...@gmail.com>
Date: 2016-08-05T16:51:13Z
Merge remote-tracking branch 'upstream/master' into IGNITE-3263
commit 7bfac77cb6ef0099b45151733d66457186c87cc5
Author: samaitra <sa...@gmail.com>
Date: 2016-08-05T16:58:10Z
IGNITE-3263 Affinity function must check for null keys
----
> Affinity function must check for null keys
> ------------------------------------------
>
> Key: IGNITE-3263
> URL: https://issues.apache.org/jira/browse/IGNITE-3263
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.6
> Reporter: Denis Magda
> Assignee: Saikat Maitra
> Labels: community
> Fix For: 1.7
>
>
> AffinityFunction implementations must check for {{null}} keys and through meaningful exceptions in such a cases.
> As an example the following code trows NPE since the keys is not validated
> {code}
> Cache<AffinityKey<String>, Person> personCache = ..;
> personCache.get(new AffinityKey<>(key, affKey)); // returns value
> personCache.get(new AffinityKey<>(key)); // throws NPE
> Exception in thread "main" java.lang.NullPointerException
> at
> org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction.partition(RendezvousAffinityFunction.java:428)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.partition(GridCacheAffinityManager.java:206)
> at
> org.apache.ignite.internal.processors.cache.GridCacheContext.toCacheKeyObject(GridCacheContext.java:1801)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.get(GridDhtAtomicCache.java:339)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4650)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1391)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(IgniteCacheProxy.java:907)
> at
> my.apache.ignite.examples.collocation.CacheCollocationExample.main(CacheCollocationExample.java:69)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)