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

Possible ArrayIndexOutOfBoundsException while preparing scan start key with multiple key range queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 4.17.0, 5.2.0, 4.16.2, 5.1.3
    • None
    • None

    Description

      There is possible AIOOE when there are multiple key range conditions on columns in a query.

      
      java.lang.ArrayIndexOutOfBoundsException: 25
      
      	at org.apache.phoenix.util.ScanUtil.setKey(ScanUtil.java:474)
      	at org.apache.phoenix.util.ScanUtil.setKey(ScanUtil.java:408)
      	at org.apache.phoenix.util.ScanUtil.getKey(ScanUtil.java:380)
      	at org.apache.phoenix.util.ScanUtil.getMinKey(ScanUtil.java:353)
      	at org.apache.phoenix.compile.ScanRanges.create(ScanRanges.java:134)
      	at org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOptimizer.java:355)
      	at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:171)
      	at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:118)
      	at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:747)
      	at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:674)
      	at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:251)
      	at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:178)
      	at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:501)
      	at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:464)
      	at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:306)
      	at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:295)
      	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
      	at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:294)
      	at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:287)
      	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1930)
      

      Attachments

        Issue Links

          Activity

            People

              rajeshbabu Rajeshbabu Chintaguntla
              rajeshbabu Rajeshbabu Chintaguntla
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: