hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anastasia Braginsky (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16164) Missing close of new compacted segments in few occasions which might leak MSLAB chunks from pool
Date Sun, 03 Jul 2016 08:57:11 GMT

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

Anastasia Braginsky commented on HBASE-16164:

Anyhow just got aware about this fix. Indeed, true problem.
I think the better way would be to use "finally statement block" instead of those if-else
Although, I can fix all the small coding-style issues in HBASE-14921, but I just always have
issues with rebases, due to many concurrent fixes in the same place... :(

[~anoop.hbase], can you please ping me about this issues just on the start? Even after getting
a ping, it might take me a day to get to it.
But anyway, I wish I can have a chance to see the fix before it is committed. 

> Missing close of new compacted segments in few occasions which might leak MSLAB chunks
from pool
> ------------------------------------------------------------------------------------------------
>                 Key: HBASE-16164
>                 URL: https://issues.apache.org/jira/browse/HBASE-16164
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Critical
>             Fix For: 2.0.0
>         Attachments: HBASE-16164.patch
> An in memory compaction of N segments in progress. Inn between snapshot() call comes.
We will stop the in progress compaction then. This just sets an AtomicBoolean.  We check this
boolean state in the compaction loop (while loop reading the cells from the segments) and
before swapping the segments. But if this scenario comes, we are just ignoring the new newly
compacted Segment. This is a problem maker when we work with MSLAB pool. The new segment would
have acquired some chunks but when will they get released? As we dont close the segment this
will leak them.
> Also in swap we have
> {code}
> public boolean swap(VersionedSegmentsList versionedList, ImmutableSegment segment) {
>     if(versionedList.getVersion() != version) {
>       return false;
>     }
>     LinkedList<ImmutableSegment> suffix;
>     synchronized (pipeline){
>       if(versionedList.getVersion() != version) {
>         return false;
>       }
> {code}
> I dont see any possibility for this code flow to happen.  Still for correctness, we should
close the segment here too.

This message was sent by Atlassian JIRA

View raw message