[ 
https://issues.apache.org/jira/browse/HBASE-12274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172889#comment-14172889
 ] 

Elliott Clark commented on HBASE-12274:
---------------------------------------

-1 I'd be worried that there's some chance the scanner can return false all the 
way to the client and confuse it about if there are more rows.

I'd rather throw an exception occasionally on shutdown than risk giving 
incorrect results to the user.

> Race between RegionScannerImpl#nextInternal() and RegionScannerImpl#close() 
> may produce null pointer exception
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-12274
>                 URL: https://issues.apache.org/jira/browse/HBASE-12274
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.6.1
>            Reporter: Ted Yu
>         Attachments: 12274-v1.txt
>
>
> I saw the following in region server log:
> {code}
> 2014-10-15 03:28:36,976 ERROR 
> [B.DefaultRpcServer.handler=0,queue=0,port=60020] ipc.RpcServer: Unexpected 
> throwable object
> java.lang.NullPointerException
>   at 
> org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(HRegion.java:5023)
>   at 
> org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:4932)
>   at 
> org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:4923)
>   at 
> org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3245)
>   at 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29994)
>   at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2078)
>   at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
>   at 
> org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
>   at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
>   at java.lang.Thread.run(Thread.java:745)
> {code}
> This is where the NPE happened:
> {code}
>         // Let's see what we have in the storeHeap.
>         KeyValue current = this.storeHeap.peek();
> {code}
> The cause was race between nextInternal(called through nextRaw) and close 
> methods.
> nextRaw() is not synchronized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to