You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yury Gerzhedovich (Jira)" <ji...@apache.org> on 2022/09/15 12:16:00 UTC

[jira] [Commented] (IGNITE-17665) Ignite node crash(CorruptedTreeException: B+Tree is corrupted) when using JDBC Thin driver

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

Yury Gerzhedovich commented on IGNITE-17665:
--------------------------------------------

[~alexey.makarevich] it's not real B+Tree corruption, unhandled exceptions converted to CorruptedTreeException. So, after fixing client code, node could be up and running.

Of course, that doesn't change the fact that this is a bug and should be fixed

> Ignite node crash(CorruptedTreeException: B+Tree is corrupted) when using JDBC Thin driver
> ------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-17665
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17665
>             Project: Ignite
>          Issue Type: Bug
>          Components: jdbc, sql
>    Affects Versions: 2.12, 2.13
>            Reporter: Alexey Makarevich
>            Priority: Critical
>         Attachments: ignite-4986b884.0-partitioned-distributedJoins-CRASH-String.log, ignite-e4793913.0-replicated-CRASH-String.log
>
>
> Create test table
> {code:java}
> CREATE TABLE `Table1` (
>   `tid` INT PRIMARY KEY,
>   `descr` VARCHAR NOT NULL
> -- )  WITH "template=replicated, CACHE_NAME=Table1";
>  )  WITH "CACHE_NAME=Table1";
> INSERT INTO Table1 (tid,descr) VALUES (236,'CCCcCcccCc'); {code}
> Try to select it with JDBC thin driver (ignite-core-2.13.0.jar for 2.13)
> {code:java}
> Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
> Connection conn = DriverManager.getConnection("jdbc:ignite:thin://192.168.56.101:10800");
> PreparedStatement stmt = conn.prepareStatement("select * from TABLE1 WHERE TID=?");
> stmt.setString(1, "asdhjhds"); 
> ResultSet rs = stmt.executeQuery();{code}
> In this case we receive
> {code:java}
> java.sql.SQLException: class org.apache.ignite.IgniteCheckedException: Data conversion error converting "asdhjhds" [22018-197] {code}
> But if we get connection with enabled distributedJoins
> {code:java}
> Connection conn = DriverManager.getConnection("jdbc:ignite:thin://192.168.56.101:10800;distributedJoins=true"); {code}
> there will be crash
> {code:java}
> [20:00:34,717][FINE][client-connector-#91][ClientListenerNioListener] Client request received [reqId=1, addr=/192.168.56.1:12755, req=JdbcQueryExecuteRequest [schemaName=PUBLIC, pageSize=1024, maxRows=0, sqlQry=select * from TABLE1 WHERE TID=?, args=Object[] [asdhjhds], stmtType=SELECT_STATEMENT_TYPE, autoCommit=true, partResReq=false, explicitTimeout=false, super=JdbcRequest [type=2, reqId=1]]]
> [20:00:34,763][SEVERE][client-connector-#91][] 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 [groupId=-1797510589, pageIds=[844420635164673], cacheId=-1797510589, cacheName=Table1, indexName=_key_PK, msg=Runtime failure on lookup row: IndexSearchRowImpl [rowHnd=o.a.i.i.processors.query.h2.index.QueryIndexRowHandler@2c34fb40]]]]class org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: B+Tree is corrupted [groupId=-1797510589, pageIds=[844420635164673], cacheId=-1797510589, cacheName=Table1, indexName=_key_PK, msg=Runtime failure on lookup row: IndexSearchRowImpl [rowHnd=org.apache.ignite.internal.processors.query.h2.index.QueryIndexRowHandler@2c34fb40]] {code}
> The same crash will be if we create table in replicated mode "WITH "template=replicated,".
> It seems that in crash cases there are no type validations\conversions...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)