hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17487) Throw exception when pushing pipeline to snapshot fails twice
Date Fri, 20 Jan 2017 10:25:26 GMT

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

Anoop Sam John commented on HBASE-17487:

I did not check the details with the code..  From the comments what I read was that in this
loop, we dont expect it to run more than 2 times.. Either 1st time or 2nd time it has to work.
 If not within this 2 times (Will never happen as of now), that is an issue..     But Ted
saying that as per the code, even in 3rd iteration it is trying to do some work in a buggy
way (I read it correct Ted?)..  If so lets be clear in this part of the code.. Just for the
sake for better readability.. This loop is in push segments as snapshot which is invoked by
snapshot() call..   Throwing an exception in a not handled way will impact the RS process
itself?  May be.. My point was that this should never happen.   EOD , when at any rare chance
this iteration not succed in 2 chances, lets have a clear log error and fail the snapshot
op..   The way Ted suggested was to throw Exception which is ok as we do similar way in many
other places.. Upper layers will handle the Exception..  As in this code, this is a buggy
situation which this method dont know how to handle.. SO it throws an Exception..  Upper layer
know that even if this method throw an Exception its ok.. Its not end of the world.. Lets
just suppress it by failing the snapshot..   Even this method , if returns a boolean or so
can indicate the success/fail and upper layer can take action..  Am I making my stand clear?
So rather than this particular method trying to do some work in a buggy way in a case which
will never happen at all, lets be more clear and fail the op.  (Again I did not check in detail
abt this new code)

> Throw exception when pushing pipeline to snapshot fails twice
> -------------------------------------------------------------
>                 Key: HBASE-17487
>                 URL: https://issues.apache.org/jira/browse/HBASE-17487
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: 17487.v2.txt
> In CompactingMemStore#pushPipelineToSnapshot() , there is limit of 3 iterations of pipeline.swap()
call after which an empty ImmutableSegment is used as snapshot.
> However, there should be at most two iterations in pushPipelineToSnapshot() since during
the second iteration there is no concurrent write to memstore.
> We should throw exception in the 3rd iteration to signify that this scenario should never

This message was sent by Atlassian JIRA

View raw message