You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Shtykh (JIRA)" <ji...@apache.org> on 2018/04/18 09:50:00 UTC

[jira] [Commented] (IGNITE-8286) ScanQuery ignore setLocal with non local partition

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

Roman Shtykh commented on IGNITE-8286:
--------------------------------------

Looks like

 
{code:java}
if (nodes.isEmpty() && part == null)
    return new GridEmptyCloseableIterator();
{code}
should be changed to

 
{code:java}
if (nodes.isEmpty())
    return new GridEmptyCloseableIterator();{code}
in _GridcacheQueryAdapter.executeScanQuery()_.

> ScanQuery ignore setLocal with non local partition
> --------------------------------------------------
>
>                 Key: IGNITE-8286
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8286
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Alexander Belyak
>            Priority: Major
>
> 1) Create partitioned cache on 2+ nodes cluster
> 2) Select some partition N, local node should not be OWNER of partition N
> 3) execute: cache.query(new ScanQuery<>().setLocal(true).setPartition(N))
> Expected result:
> empty result (probaply with logging smth like "Trying to execute local query <query> with non local partition N") or even throw exception
> Actual result:
> executing (with ScanQueryFallbackClosableIterator) query on remote node.
> Problem is that we execute local query on remote node.
> Same behaviour can be achieved if we get empty node list from GridCacheQueryAdapter.node() by any reasons, for example - if we run "local" query from non data node from given cache (see GridDiscoveryNamager.cacheAffinityNode(ClusterNode node, String cacheName) in GridcacheQueryAdapter.executeScanQuery()



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