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

Delete from table more than 100 rows fails with IndexOutOfBould

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

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.11.0
    • None
    • None
    • None

    Description

      That happens because in UngroupedAggregateRegionObserver to check whether we have something to commit we call readyToCommit. We do that for both - data table mutations and local indexes ( indexMutations). In this method we check only rows count from original table, but not the size of mutations list. Since indexMutations is using only for local indexes, in regular cases the list will be empty and when we call commitBatch for empty list it fails with an exception :

      Error: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: GIGANTIC_TABLE,,1498079753609.137788ceb573b20bbbb7cdcaeb6ba489.: Index: 0, Size: 0
      	at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:92)
      	at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:58)
      	at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.overrideDelegate(BaseScannerRegionObserver.java:240)
      	at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.nextRaw(BaseScannerRegionObserver.java:266)
      	at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2506)
      	at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32385)
      	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2141)
      	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:187)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:167)
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.get(ArrayList.java:429)
      	at org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver.commitBatch(UngroupedAggregateRegionObserver.java:193)
      	at org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver.doPostScannerOpen(UngroupedAggregateRegionObserver.java:713)
      	at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.overrideDelegate(BaseScannerRegionObserver.java:221)
      	... 7 more (state=08000,code=101)
      

      Attachments

        Issue Links

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment