[ https://issues.apache.org/jira/browse/IGNITE-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094873#comment-16094873 ]
ASF GitHub Bot commented on IGNITE-5795: ---------------------------------------- GitHub user dkarachentsev opened a pull request: https://github.com/apache/ignite/pull/2330 IGNITE-5795 IgniteIGNITE-5795 @AffinityKeyMapped ignored if QueryEntity used You can merge this pull request into a Git repository by running: $ git pull https://github.com/gridgain/apache-ignite ignite-5795 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/2330.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 #2330 ---- commit e867266b4cc2f177f39852665ff6c66ef8f59ffe Author: dkarachentsev <dkarachent...@gridgain.com> Date: 2017-07-20T15:54:42Z IGNITE-5795 Test reproducer. ---- > @AffinityKeyMapped ignored if QueryEntity used > ---------------------------------------------- > > Key: IGNITE-5795 > URL: https://issues.apache.org/jira/browse/IGNITE-5795 > Project: Ignite > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Dmitry Karachentsev > Fix For: 2.2 > > > When cache configured with QueryEntity and used key type with > @AffinityKeyMapped field, it will be ignored and wrong partition calculated. > This happens because QueryEntity processing precedes key type registering in > binary meta cache. On that step > CacheObjectBinaryProcessorImpl#affinityKeyField called and unable to resolve > type, so null returned and null putted in affKeyFields. > On next put/get operation CacheObjectBinaryProcessorImpl#affinityKeyField > will return null from affKeyFields, but should be affinity key field. -- This message was sent by Atlassian JIRA (v6.4.14#64029)