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

Anoop Sam John commented on HBASE-24377:
----------------------------------------

 I think I got exactly when we will see this issue. 

Method reclaimMemStoreMemory() Will be called from RSRpcServices every time 
during a write op (mutate, multi etc).  This will check for the memory global 
barrier and do actions.  You can see in this method the flushType will be set 
and then we add a WAKEUPFLUSH_INSTANCE entry so that the FlushHandler threads 
get this entry.  This will again do watermark check and call 
flushOneForGlobalPressure but by then the flushType is been set already.

But there is another possible thread flow which can also check this barrier. 
When the FlushHandler wake up time reached and so it poll and see 'fqe' as 
null, still it check the barrier. Ya by then already the barrier might have 
reached.  (But the other thread did not call reclaimMemStoreMemory and set the 
state). This time the call to flushOneForGlobalPressure  will result in NPE.

> MemStoreFlusher throw NullPointerException
> ------------------------------------------
>
>                 Key: HBASE-24377
>                 URL: https://issues.apache.org/jira/browse/HBASE-24377
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lijin Bin
>            Priority: Major
>
> {code}
> 2020-02-26 10:15:33,585 ERROR [MemStoreFlusher.2] 
> regionserver.MemStoreFlusher: Cache flusher failed for entry null
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushOneForGlobalPressure(MemStoreFlusher.java:158)
>         at 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher.access$700(MemStoreFlusher.java:68)
>         at 
> org.apache.hadoop.hbase.regionserver.MemStoreFlusher$FlushHandler.run(MemStoreFlusher.java:346)
>         at java.lang.Thread.run(Thread.java:745)
> {code}
> Need to setFlushType first before use it. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to