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

Possible NegativeArraySizeException while scanning local indexes during regions merge

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.8.0
    • None
    • None

    Description

      While scanning local indexes during regions merge we might end up with NegativeArraySizeException which leads to RS down. The reason for this is some times HBase won't do real seek and considered fake keyvalues(can be scan start row) as seeked kvs. In that case we ended up with this issue when we call peek without seek. So for local indexes we need to enforce seek all the time for scanning local index reference files.

      2016-07-15 17:27:04,419 ERROR [B.fifo.QRpcServer.handler=8,queue=2,port=16020] coprocessor.CoprocessorHost: The coprocessor org.apache.hadoop.hbase.regionserver.IndexHalfStoreFileReaderGenerator threw java.lang.NegativeArraySizeException
      java.lang.NegativeArraySizeException
      	at org.apache.hadoop.hbase.regionserver.LocalIndexStoreFileScanner.getNewRowkeyByRegionStartKeyReplacedWithSplitKey(LocalIndexStoreFileScanner.java:242)
      	at org.apache.hadoop.hbase.regionserver.LocalIndexStoreFileScanner.getChangedKey(LocalIndexStoreFileScanner.java:76)
      	at org.apache.hadoop.hbase.regionserver.LocalIndexStoreFileScanner.peek(LocalIndexStoreFileScanner.java:68)
      	at org.apache.hadoop.hbase.regionserver.KeyValueHeap.<init>(KeyValueHeap.java:87)
      	at org.apache.hadoop.hbase.regionserver.KeyValueHeap.<init>(KeyValueHeap.java:71)
      	at org.apache.hadoop.hbase.regionserver.StoreScanner.resetKVHeap(StoreScanner.java:378)
      	at org.apache.hadoop.hbase.regionserver.StoreScanner.<init>(StoreScanner.java:227)
      	at org.apache.hadoop.hbase.regionserver.IndexHalfStoreFileReaderGenerator$1.<init>(IndexHalfStoreFileReaderGenerator.java:259)
      	at org.apache.hadoop.hbase.regionserver.IndexHalfStoreFileReaderGenerator.preStoreScannerOpen(IndexHalfStoreFileReaderGenerator.java:258)
      	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$51.call(RegionCoprocessorHost.java:1284)
      	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1638)
      	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1712)
      	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperationWithResult(RegionCoprocessorHost.java:1677)
      	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preStoreScannerOpen(RegionCoprocessorHost.java:1279)
      	at org.apache.hadoop.hbase.regionserver.HStore.getScanner(HStore.java:2110)
      	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.<init>(HRegion.java:5568)
      	at org.apache.hadoop.hbase.regionserver.HRegion.instantiateRegionScanner(HRegion.java:2626)
      	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2612)
      	at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2594)
      	at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2271)
      	at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32205)
      	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2127)
      	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
      	at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
      	at java.lang.Thread.run(Thread.java:745)
      

      Thanks Sergio Peleato for finding this issue. Added you as reporter for this issue.

      Attachments

        Activity

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

          People

            rajeshbabu Rajeshbabu Chintaguntla
            speleato Sergio Peleato
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment