You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2020/11/25 09:00:26 UTC
[jira] [Created] (IGNITE-13756) Node crash if select uses index
field with wrong type
Andrey Mashenkov created IGNITE-13756:
-----------------------------------------
Summary: Node crash if select uses index field with wrong type
Key: IGNITE-13756
URL: https://issues.apache.org/jira/browse/IGNITE-13756
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Andrey Mashenkov
Steps to reproduce:
1. Start node with cache configuration:
{code:java}
<bean name="endpoint-cache" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="endpoint-cache"/>
<property name="cacheMode" value="REPLICATED"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="expiryPolicyFactory">
<bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
<constructor-arg>
<bean class="javax.cache.expiry.Duration">
<constructor-arg value="MILLISECONDS"/>
<constructor-arg value="300000"/>
</bean>
</constructor-arg>
</bean>
</property>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="java.lang.String"/>
<property name="valueType" value="endpoints.EndpointCacheValue"/>
<property name="fields">
<map>
<entry key="sendTime" value="java.lang.Long"/>
<entry key="createdOn" value="java.lang.Long"/>
<entry key="userId" value="java.lang.Long"/>
<entry key="srvReqId" value="java.lang.String"/>
<entry key="processed" value="java.lang.Boolean"/>
</map>
</property>
<property name="indexes">
<list>
<bean class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="createdOn"/>
</bean>
<bean class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="sendTime"/>
</bean>
<bean class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="userId"/>
</bean>
<bean class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="srvReqId"/>
</bean>
<bean class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="processed"/>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
{code}
2. Insert some data using SQL thin client:
{code:java}
0: jdbc:ignite:thin://127.0.0.1:10800> insert into "endpoint-cache".ENDPOINTCACHEVALUE (_key, SENDTIME,CREATEDON,USERID,SRVREQID,PROCESSED) values (1, 12345, 12345, 123456789, 'POST', True);
1 row affected (0.206 seconds)
0: jdbc:ignite:thin://127.0.0.1:10800> insert into "endpoint-cache".ENDPOINTCACHEVALUE (_key, SENDTIME,CREATEDON,USERID,SRVREQID,PROCESSED) values (2, 12345, 12345, 123456789, 'POST', True);
1 row affected (0.016 seconds)
0: jdbc:ignite:thin://127.0.0.1:10800> insert into "endpoint-cache".ENDPOINTCACHEVALUE (_key, SENDTIME,CREATEDON,USERID,SRVREQID,PROCESSED) values (3, 12345, 12345, 123456789, 'POST', True);
{code}
3. Run select:
{code:java}
SELECT CREATEDON,USERID,SRVREQID,PROCESSED FROM "endpoint-cache".ENDPOINTCACHEVALUE p where SRVREQID=123;
{code}
Actual result:
Node crushed cause of corrupted B+Tree:
{code:java}
[2019-07-25 23:37:22,734][ERROR][client-connector-#63][root] Critical system error detected. Will be handled accordingly to configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=CRITICAL_ERROR, err=class o.a.i.i.processors.cache.persistence.tree.CorruptedTreeException: B+Tree is corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=1739103562, val2=844420635164677]], msg=Runtime failure on bounds: [lower=RowSimple [vals=Value[] [null, null, null, null, null, null, 123, null, null]], upper=RowSimple [vals=Value[] [null, null, null, null, null, null, 123, null, null]]]]]]
class org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: B+Tree is corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=1739103562, val2=844420635164677]], msg=Runtime failure on bounds: [lower=RowSimple [vals=Value[] [null, null, null, null, null, null, 123, null, null]], upper=RowSimple [vals=Value[] [null, null, null, null, null, null, 123, null, null]]]]
at org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.corruptedTreeException(BPlusTree.java:5169)
at org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.find(BPlusTree.java:1035)
at org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.find(H2TreeIndex.java:240)
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)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:111)
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:974)
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1047)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:526)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:353)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:210)
at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:163)
at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:161)
at org.apache.ignite.internal.util.lang.IgniteInClosure2X.apply(IgniteInClosure2X.java:38)
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(IgniteH2Indexing.java:2425)
at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1541)
at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:794)
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1120)
at org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:95)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcQueryCursor.<init>(JdbcQueryCursor.java:61)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:464)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:203)
at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:182)
at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:49)
at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)