You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Kuznetsov (JIRA)" <ji...@apache.org> on 2018/03/26 13:16:00 UTC

[jira] [Comment Edited] (IGNITE-6807) NPE is thrown if local query is executed on client

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

Pavel Kuznetsov edited comment on IGNITE-6807 at 3/26/18 1:15 PM:
------------------------------------------------------------------

branch ignite-6807
[~tledkov-gridgain] , Please review changes
- Implemented test that reproduces this issue (org.apache.ignite.internal.processors.query.ClientLocalQueryTest)
- Added validation to org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl#validate


was (Author: pkouznet):
branch ignite-6807
[~tledkov-gridgain] , Please review changes

> NPE is thrown if local query is executed on client
> --------------------------------------------------
>
>                 Key: IGNITE-6807
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6807
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.3
>            Reporter: Valentin Kulichenko
>            Assignee: Pavel Kuznetsov
>            Priority: Major
>              Labels: usability
>
> If a local query is executed on client node by mistake, ugly NPE is thrown:
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.segmentsCount(H2TreeIndex.java:162)
> 	at org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase.threadLocalSegment(GridH2IndexBase.java:172)
> 	at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:177)
> 	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)
> 	... 21 more
> {noformat}
> We should detect this situation and throw proper exception instead.



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