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

Jean-Marc Spaggiari commented on HBASE-11794:
---------------------------------------------

Do you have the stackTrace of the exception? Are we sure changing this will not 
have any other impact? Seems to be called only from flushCache but we might 
want to check deeper just in case.

>From the code side, if you change the result to being new ArrayList<Path>() by 
>default, then you will ned to change also finally logic. "result != null" will 
>not be possible anymore. Also, I don't think we need to clear it. If !success, 
>then we failed the line before assigning succes to true, which is where we 
>assigne result. So if !success, then result can only have the default value, 
>which is already empty. So at the end, I think this entire block can be 
>removed.


So, based on the javadoc from StoreFlusher:
{code}
@return List of files written. Can be empty; must not be null.
{code}
 I will say +1 to change the result default value:

Also, please update the finally section.

> StripeStoreFlusher causes NullPointerException and Region down
> --------------------------------------------------------------
>
>                 Key: HBASE-11794
>                 URL: https://issues.apache.org/jira/browse/HBASE-11794
>             Project: HBase
>          Issue Type: Bug
>          Components: Compaction
>    Affects Versions: 0.98.3, 0.98.4, 0.98.5
>            Reporter: jeongmin kim
>            Priority: Critical
>
> StoreFlusher.flushSnapshot() mustn't return null value.
> But StripeStoreFlusher.flushSnapshot() does.
> It cause NullPointerException at 
> org.apache.hadoop.hbase.regionserver.HStore.flushCache(HStore.java:802)
> and this makes regions dead after exhaustive retries and no recovery 
> available from it.
> the code (StripeStoreFlusher:64) has to be changed 
> ===============
> from
>     List<Path> result = null 
> to
>      List<Path> result = new ArrayList<Path>();
>  ===============
> to return a empty list not null value.
>     



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to