Pavel Kovalenko created IGNITE-10397:
----------------------------------------

             Summary: SQL Schema may be lost after cluster activation and 
simple query run
                 Key: IGNITE-10397
                 URL: https://issues.apache.org/jira/browse/IGNITE-10397
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.8
            Reporter: Pavel Kovalenko
            Assignee: Pavel Kovalenko
             Fix For: 2.8


Scenario:

1) Start 3 grids in a multithread mode with auto-activation.
2) Start the client.
3) Run a simple query like this
{noformat}
cache(DEFAULT_CACHE_NAME + 0).query(new SqlQuery<>(Integer.class, 
"1=1")).getAll();
{noformat}

Exception with the message that schema not found will be thrown:

{noformat}
[2018-11-23 
19:56:57,284][ERROR][query-#223%distributed.CacheMessageStatsIndexingTest2%][GridMapQueryExecutor]
 Failed to execute local query.
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
set schema for DB connection for thread [schema=default0]
    at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForThread(IgniteH2Indexing.java:549)
    at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForSchema(IgniteH2Indexing.java:392)
    at 
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:767)
    at 
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:637)
    at 
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:224)
    at 
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor$2.onMessage(GridMapQueryExecutor.java:184)
    at 
org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:2333)
    at 
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1556)
    at 
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1184)
    at 
org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:125)
    at 
org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1091)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLException: Schema "default0" not found; SQL 
statement:
SET SCHEMA "default0" [90079-195]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.engine.Database.getSchema(Database.java:1755)
    at org.h2.command.dml.Set.update(Set.java:408)
    at org.h2.command.CommandContainer.update(CommandContainer.java:101)
    at org.h2.command.Command.executeUpdate(Command.java:260)
    at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:137)
    at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:122)
    at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForThread(IgniteH2Indexing.java:541)
    ... 13 more
{noformat}




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

Reply via email to