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

Anastasia Braginsky commented on HBASE-18375:
---------------------------------------------

I saw the findbug. It is about volatile field "version" being increased in 
method replaceAtIndex() which doesn't have a synchronized block. However, the 
only invocation of replaceAtIndex() method is from synchronized block inside 
flattenOneSegment() method. So, after all the volatile field "version" is 
updated within synchronized block, which is stated in the comments in the code.

It looks like the way to satisfy the "findbug" is to move the content of  
replaceAtIndex() method into flattenOneSegment() method, and this I do not 
like. Also to relay on re-entrance of synchronized method is bad here, because 
we must have synchronized block earlier and someone may think that this is 
enough. So I decided to leave it like this. [~ram_krish], hat do you think?

> The pool chunks from ChunkCreator are deallocated while in pool because there 
> is no reference to them
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18375
>                 URL: https://issues.apache.org/jira/browse/HBASE-18375
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0-alpha-1
>            Reporter: Anastasia Braginsky
>            Assignee: Anastasia Braginsky
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: HBASE-18375-V01.patch, HBASE-18375-V02.patch, 
> HBASE-18375-V03.patch, HBASE-18375-V04.patch, HBASE-18375-V05.patch, 
> HBASE-18375-V06.patch, HBASE-18375-V07.patch, HBASE-18375-V08.patch, 
> HBASE-18375-V09.patch
>
>
> Because MSLAB list of chunks was changed to list of chunk IDs, the chunks 
> returned back to pool can be deallocated by JVM because there is no reference 
> to them. The solution is to protect pool chunks from GC by the strong map of 
> ChunkCreator introduced by HBASE-18010. Will prepare the patch today.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to