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 2018/08/13 15:10:00 UTC

[jira] [Commented] (IGNITE-5795) @AffinityKeyMapped ignored if QueryEntity used

    [ https://issues.apache.org/jira/browse/IGNITE-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578412#comment-16578412 ] 

ASF GitHub Bot commented on IGNITE-5795:
----------------------------------------

GitHub user dmekhanikov opened a pull request:

    https://github.com/apache/ignite/pull/4530

    IGNITE-5795 Ensure binary metadata registration on start of cache with QueryEntity.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-5795-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/4530.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 #4530
    
----
commit ac87d103371b88728590f469c96ec45ab3fc0189
Author: Denis Mekhanikov <dm...@...>
Date:   2018-08-13T14:58:26Z

    IGNITE-5795 Ensure binary metadata registration on start of cache with QueryEntity.

commit 8b81882ef8e2912bc39a32a59e2966bb1f800fce
Author: Denis Mekhanikov <dm...@...>
Date:   2018-08-13T14:59:45Z

    IGNITE-5795 Add a test.

----


> @AffinityKeyMapped ignored if QueryEntity used
> ----------------------------------------------
>
>                 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: Denis Mekhanikov
>            Priority: Major
>              Labels: usability
>             Fix For: 2.7
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)