Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3163

Split during global index creation may cause ERROR 201 error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.8.0
    • 4.14.0, 5.0.0
    • None
    • None

    Description

      When we create global index and split happen meanwhile there is a chance to fail with ERROR 201:

      2016-08-08 15:55:17,248 INFO  [Thread-6] org.apache.phoenix.iterate.BaseResultIterators(878): Failed to execute task during cancel
      java.util.concurrent.ExecutionException: java.sql.SQLException: ERROR 201 (22000): Illegal data.
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      	at org.apache.phoenix.iterate.BaseResultIterators.close(BaseResultIterators.java:872)
      	at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:809)
      	at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:713)
      	at org.apache.phoenix.iterate.RoundRobinResultIterator.getIterators(RoundRobinResultIterator.java:176)
      	at org.apache.phoenix.iterate.RoundRobinResultIterator.next(RoundRobinResultIterator.java:91)
      	at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:815)
      	at org.apache.phoenix.compile.DelegateMutationPlan.execute(DelegateMutationPlan.java:31)
      	at org.apache.phoenix.compile.PostIndexDDLCompiler$1.execute(PostIndexDDLCompiler.java:124)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl.updateData(ConnectionQueryServicesImpl.java:2823)
      	at org.apache.phoenix.schema.MetaDataClient.buildIndex(MetaDataClient.java:1079)
      	at org.apache.phoenix.schema.MetaDataClient.createIndex(MetaDataClient.java:1382)
      	at org.apache.phoenix.compile.CreateIndexCompiler$1.execute(CreateIndexCompiler.java:85)
      	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
      	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
      	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
      	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
      	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
      	at org.apache.phoenix.hbase.index.write.TestIndexWriter$1.run(TestIndexWriter.java:93)
      Caused by: java.sql.SQLException: ERROR 201 (22000): Illegal data.
      	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:441)
      	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
      	at org.apache.phoenix.schema.types.PDataType.newIllegalDataException(PDataType.java:287)
      	at org.apache.phoenix.schema.types.PUnsignedSmallint$UnsignedShortCodec.decodeShort(PUnsignedSmallint.java:146)
      	at org.apache.phoenix.schema.types.PSmallint.toObject(PSmallint.java:104)
      	at org.apache.phoenix.schema.types.PSmallint.toObject(PSmallint.java:28)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:980)
      	at org.apache.phoenix.schema.types.PUnsignedSmallint.toObject(PUnsignedSmallint.java:102)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:980)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:992)
      	at org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:830)
      	at org.apache.phoenix.schema.types.PDecimal.coerceBytes(PDecimal.java:342)
      	at org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:810)
      	at org.apache.phoenix.expression.CoerceExpression.evaluate(CoerceExpression.java:149)
      	at org.apache.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:69)
      	at org.apache.phoenix.jdbc.PhoenixResultSet.getBytes(PhoenixResultSet.java:308)
      	at org.apache.phoenix.compile.UpsertCompiler.upsertSelect(UpsertCompiler.java:197)
      	at org.apache.phoenix.compile.UpsertCompiler.access$000(UpsertCompiler.java:115)
      	at org.apache.phoenix.compile.UpsertCompiler$UpsertingParallelIteratorFactory.mutate(UpsertCompiler.java:259)
      	at org.apache.phoenix.compile.MutatingParallelIteratorFactory.newIterator(MutatingParallelIteratorFactory.java:59)
      	at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:112)
      	at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:103)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.phoenix.job.JobManager$InstrumentedJobFutureTask.run(JobManager.java:183)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      java.sql.SQLException: ERROR 201 (22000): Illegal data. ERROR 201 (22000): Illegal data.
      	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:441)
      	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
      	at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:129)
      	at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:118)
      	at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:107)
      	at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:768)
      	at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:713)
      	at org.apache.phoenix.iterate.RoundRobinResultIterator.getIterators(RoundRobinResultIterator.java:176)
      	at org.apache.phoenix.iterate.RoundRobinResultIterator.next(RoundRobinResultIterator.java:91)
      	at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:815)
      	at org.apache.phoenix.compile.DelegateMutationPlan.execute(DelegateMutationPlan.java:31)
      	at org.apache.phoenix.compile.PostIndexDDLCompiler$1.execute(PostIndexDDLCompiler.java:124)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl.updateData(ConnectionQueryServicesImpl.java:2823)
      	at org.apache.phoenix.schema.MetaDataClient.buildIndex(MetaDataClient.java:1079)
      	at org.apache.phoenix.schema.MetaDataClient.createIndex(MetaDataClient.java:1382)
      	at org.apache.phoenix.compile.CreateIndexCompiler$1.execute(CreateIndexCompiler.java:85)
      	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
      	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
      	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
      	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
      	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
      	at org.apache.phoenix.hbase.index.write.TestIndexWriter$1.run(TestIndexWriter.java:93)
      Caused by: java.sql.SQLException: ERROR 201 (22000): Illegal data.
      	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:441)
      	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
      	at org.apache.phoenix.schema.types.PDataType.newIllegalDataException(PDataType.java:287)
      	at org.apache.phoenix.schema.types.PUnsignedSmallint$UnsignedShortCodec.decodeShort(PUnsignedSmallint.java:146)
      	at org.apache.phoenix.schema.types.PSmallint.toObject(PSmallint.java:104)
      	at org.apache.phoenix.schema.types.PSmallint.toObject(PSmallint.java:28)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:980)
      	at org.apache.phoenix.schema.types.PUnsignedSmallint.toObject(PUnsignedSmallint.java:102)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:980)
      	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:992)
      	at org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:830)
      	at org.apache.phoenix.schema.types.PDecimal.coerceBytes(PDecimal.java:342)
      	at org.apache.phoenix.schema.types.PDataType.coerceBytes(PDataType.java:810)
      	at org.apache.phoenix.expression.CoerceExpression.evaluate(CoerceExpression.java:149)
      	at org.apache.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:69)
      	at org.apache.phoenix.jdbc.PhoenixResultSet.getBytes(PhoenixResultSet.java:308)
      	at org.apache.phoenix.compile.UpsertCompiler.upsertSelect(UpsertCompiler.java:197)
      	at org.apache.phoenix.compile.UpsertCompiler.access$000(UpsertCompiler.java:115)
      	at org.apache.phoenix.compile.UpsertCompiler$UpsertingParallelIteratorFactory.mutate(UpsertCompiler.java:259)
      	at org.apache.phoenix.compile.MutatingParallelIteratorFactory.newIterator(MutatingParallelIteratorFactory.java:59)
      	at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:112)
      	at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:103)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.phoenix.job.JobManager$InstrumentedJobFutureTask.run(JobManager.java:183)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        1. PHOENIX-3163_addendum1.patch
          1 kB
          James R. Taylor
        2. PHOENIX-3163_v1.patch
          1 kB
          Samarth Jain
        3. PHOENIX-3163_v3.patch
          2 kB
          Rajeshbabu Chintaguntla
        4. PHOENIX-3163_v4.patch
          5 kB
          Rajeshbabu Chintaguntla
        5. PHOENIX-3163_v5.patch
          6 kB
          James R. Taylor
        6. PHOENIX-3163_v6.patch
          5 kB
          James R. Taylor

        Issue Links

          Activity

            People

              sergey.soldatov Sergey Soldatov
              sergey.soldatov Sergey Soldatov
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: