You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Evgenii Zagumennov (JIRA)" <ji...@apache.org> on 2018/07/21 13:38:00 UTC

[jira] [Created] (IGNITE-9048) Local SqlFieldsQuery on client leads to exception

Evgenii Zagumennov created IGNITE-9048:
------------------------------------------

             Summary: Local SqlFieldsQuery on client leads to exception
                 Key: IGNITE-9048
                 URL: https://issues.apache.org/jira/browse/IGNITE-9048
             Project: Ignite
          Issue Type: Bug
          Components: cache, clients, sql
            Reporter: Evgenii Zagumennov
         Attachments: LocalSqlFieldsQueryOnClientFailTest.java

SqlFieldsQuery with setLocal(true) on client node throws exception

 
{code:java}
Caused by: java.lang.NullPointerException
    at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.segmentsCount(H2TreeIndex.java:187)
    at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase.threadLocalSegment(GridH2IndexBase.java:182)
    at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:195)
    at org.h2.index.BaseIndex.find(BaseIndex.java:128)
    at org.h2.index.IndexCursor.find(IndexCursor.java:169)
    at org.h2.table.TableFilter.next(TableFilter.java:468)
    at org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)
    at org.h2.result.LazyResult.hasNext(LazyResult.java:79)
    at org.h2.result.LazyResult.next(LazyResult.java:59)
    at org.h2.command.dml.Select.queryFlat(Select.java:519)
    at org.h2.command.dml.Select.queryWithoutCache(Select.java:625)
    at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:114)
    at org.h2.command.dml.Query.query(Query.java:352)
    at org.h2.command.dml.Query.query(Query.java:333)
    at org.h2.command.CommandContainer.query(CommandContainer.java:113)
    at org.h2.command.Command.executeQuery(Command.java:201)
    ... 18 more{code}
 

Reproducer "LocalSqlFieldsQueryOnClientFailTest.java" is in the attachement



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

Re: [jira] [Created] (IGNITE-9048) Local SqlFieldsQuery on client leads to exception

Posted by Vyacheslav Daradur <da...@gmail.com>.
Hi, which Ignite's version do you use?

*Local* queries are prohibited on client nodes since they do not store data.

The check was added within task [1] and included in Ignite 2.7 release.

[1] https://issues.apache.org/jira/browse/IGNITE-8915

On Tue, Jan 8, 2019 at 10:17 PM prashant <pr...@gmail.com> wrote:
>
> Hi Guys,
>
> I am also running into same issue where I am doing local query
>
>             SqlFieldsQuery query = new SqlFieldsQuery(sql);
>             query.setLocal(true);
>             FieldsQueryCursor<List&lt;?>> fq = cache.query(query);
>
>
> This leads to same exception stack trace.
>
> Is there any workaround where I would like query to be only issued against
> the rows that are cached locally on the query node.
>
> Thank you very much
> Prashant Patel
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/



-- 
Best Regards, Vyacheslav D.

Re: [jira] [Created] (IGNITE-9048) Local SqlFieldsQuery on client leads to exception

Posted by prashant <pr...@gmail.com>.
Hi Guys,

I am also running into same issue where I am doing local query

            SqlFieldsQuery query = new SqlFieldsQuery(sql);
            query.setLocal(true);
            FieldsQueryCursor<List&lt;?>> fq = cache.query(query);


This leads to same exception stack trace. 

Is there any workaround where I would like query to be only issued against
the rows that are cached locally on the query node.

Thank you very much
Prashant Patel



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/