[ https://issues.apache.org/jira/browse/IGNITE-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630293#comment-16630293 ]
ASF GitHub Bot commented on IGNITE-5795: ---------------------------------------- GitHub user akalash opened a pull request: https://github.com/apache/ignite/pull/4852 IGNITE-5795 Binary metadata is registered during start of cache You can merge this pull request into a Git repository by running: $ git pull https://github.com/gridgain/apache-ignite ignite-5795-2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/4852.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 #4852 ---- commit 1a54bc1bb721626441ff2d19c988660bf913ec67 Author: Anton Kalashnikov <kaa.dev@...> Date: 2018-09-27T12:19:33Z IGNITE-5795 Binary metadata is registered during start of cache ---- > Binary metadata is not registered during start of cache > ------------------------------------------------------- > > Key: IGNITE-5795 > URL: https://issues.apache.org/jira/browse/IGNITE-5795 > Project: Ignite > Issue Type: Bug > Components: sql > Affects Versions: 2.0 > Reporter: Dmitry Karachentsev > Assignee: Anton Kalashnikov > Priority: Major > Labels: usability > Fix For: 2.8 > > > 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. > Test that reproduces problem in [PR > 2330|https://github.com/apache/ignite/pull/2330] > To wrorkaround the issue, set IgniteConfiguration#setKeyConfiguration(), it > will force registering key. > *Root cause of this behaviour* is that in during cache registration > registration of metadata doesn't happen. It lead to exchange messages like > (MappingProposedMessage, MetadataRequestMessage etc.) which are often > redundant and also lead to behaviour described above(unhandled > AffinityKeyMapped). > Main idea to fix this problem it is registration of metadata locally in > during cache start on each node without messages exchange. -- This message was sent by Atlassian JIRA (v7.6.3#76005)