Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-20411

IndexOutOfBoundsException in SqlRowHandler$BinaryTupleRowWrapper

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 3.0
    • sql

    Description

      Exception:

      java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2
      	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
      	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
      	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
      	at java.base/java.util.Objects.checkIndex(Objects.java:372)
      	at java.base/java.util.ArrayList.get(ArrayList.java:459)
      	at org.apache.ignite.internal.sql.engine.exec.SqlRowHandler$BinaryTupleRowWrapper.get(SqlRowHandler.java:357)
      	at org.apache.ignite.internal.sql.engine.exec.SqlRowHandler.get(SqlRowHandler.java:74)
      	at org.apache.ignite.internal.sql.engine.exec.SqlRowHandler.get(SqlRowHandler.java:65)
      	at org.apache.ignite.internal.sql.engine.exec.UpdatableTableImpl.convertRow(UpdatableTableImpl.java:337)
      	at org.apache.ignite.internal.sql.engine.exec.UpdatableTableImpl.insertAll(UpdatableTableImpl.java:242)
      	at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.flushTuples(ModifyNode.java:219)
      	at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.tryEnd(ModifyNode.java:190)
      	at org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode.end(ModifyNode.java:163)
      	at org.apache.ignite.internal.sql.engine.exec.rel.Inbox.pushUnordered(Inbox.java:344)
      	at org.apache.ignite.internal.sql.engine.exec.rel.Inbox.push(Inbox.java:202)
      	at org.apache.ignite.internal.sql.engine.exec.rel.Inbox.onBatchReceived(Inbox.java:180)
      	at org.apache.ignite.internal.sql.engine.exec.ExchangeServiceImpl.onMessage(ExchangeServiceImpl.java:167)
      	at org.apache.ignite.internal.sql.engine.exec.ExchangeServiceImpl.lambda$start$1(ExchangeServiceImpl.java:73)
      	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:150)
      	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$0(MessageServiceImpl.java:119)
      	at org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:81)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      Reproducer:
      Add this test to ItSqlSynchronousApiTest

          @Test
          public void testUpdateTable() {
              IgniteSql sql = igniteSql();
              Session ses = sql.createSession();
              checkDdl(true, ses, "CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
      
              var upsertFut = CompletableFuture.runAsync(() -> {
                  for (int i = 0; i < 1000; i++) {
                      checkDml(1, ses, "INSERT INTO TEST VALUES (?, ?)", i, i);
                  }
              });
      
              checkDdl(true, ses, "ALTER TABLE TEST ADD COLUMN VAL1 INT DEFAULT -1");
      
              upsertFut.join();
          }
      

      NOTE
      Original exception stack trace seems to be lost if you just run the test, I had to use debugger to get it. Consider addressing this too.


      This use was fixed in IGNITE-20520. This ticket just removed UpdateSchemaListener that is no longer in use.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mzhuravkov Maksim Zhuravkov
            ptupitsyn Pavel Tupitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 40m
                2h 40m

                Slack

                  Issue deployment