[
https://issues.apache.org/jira/browse/IGNITE-10643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718932#comment-16718932
]
ASF GitHub Bot commented on IGNITE-10643:
-----------------------------------------
GitHub user devozerov opened a pull request:
https://github.com/apache/ignite/pull/5649
IGNITE-10643
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-10643-1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/5649.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 #5649
----
commit 1fe7855cf019d69f574bce6a272e34be6af22901
Author: devozerov <vozerov@...>
Date: 2018-12-12T11:38:11Z
Streamlining binary context.
commit 56e31ff76b3f73ace6a64643f091d566ed2a1b43
Author: devozerov <vozerov@...>
Date: 2018-12-12T11:41:13Z
WIP.
commit 211ba243bbc06c14bd4c4d4252570579361067f2
Author: devozerov <vozerov@...>
Date: 2018-12-12T12:40:26Z
Done?
----
> GridCacheContextInfo should not use isCacheContextInited() method to
> calculate constant properties
> --------------------------------------------------------------------------------------------------
>
> Key: IGNITE-10643
> URL: https://issues.apache.org/jira/browse/IGNITE-10643
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Vladimir Ozerov
> Assignee: Vladimir Ozerov
> Priority: Major
> Labels: iep-24
> Fix For: 2.8
>
>
> This appears to be a regression from IGNITE-6173. Current method
> {{isCacheContextInited}} is used to determine several properties (config,
> name, customAffinityMapper, groupId, cacheId, affinityNode). This is wrong,
> as all of these properties are "constant" and can be deduced form
> configuration.
> One specific case when it breaks Ignite is {{customAffinityMapper}}. It is
> used to determine affinity key field in {{GridH2Table}} which will be used
> later on for partition pruning. However, when table is created on a client
> node and context is not initialized yet, it will return "false", and
> incorrect affinity key will be calculated in
> {{QueryUtils.typeForQueryEntity}} and in {{GridH2Table}} later on. Finally,
> when query is executed, incorrect partition might be derived from it leading
> to incorrect query result.
> Solution: make all mentioned methods independent of cache state.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)