Vladimir Ozerov created IGNITE-10643:
----------------------------------------
Summary: 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: Task
Reporter: Vladimir Ozerov
Assignee: Yury Gerzhedovich
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)