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

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

Looks mostly good.  The placement of the post hook is fine now.
processRowsWithLocks() we deal with the try blocks now. An outer try block is 
removed. 
Inside this outer try, we called getRowLock.  That can get timeout and throw 
exception so that no ops will happen.  Previously the outer try finally will do 
the closeRegionOp.  Now if u remove and move the calls out of try, that can be 
an issue.  Can u just keep the original way of try's and finally.
Just move the call to post from old place to correct new place.   Always make 
sure to call the cp hooks within try finally. (Which u are ensuring I can see. 
Good)

> RowProcess#postBatchMutate doesn’t be executed before the mvcc transaction 
> completion
> -------------------------------------------------------------------------------------
>
>                 Key: HBASE-16989
>                 URL: https://issues.apache.org/jira/browse/HBASE-16989
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: ChiaPing Tsai
>            Assignee: ChiaPing Tsai
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16989.v0.patch, HBASE-16989.v1.patch, 
> HBASE-16989.v2.patch
>
>
> After the [HBASE-15158|https://issues.apache.org/jira/browse/HBASE-15158], 
> RowProcess#postBatchMutate will be executed “after” the mvcc transaction 
> completion.
> {code:title=HRegion#processRowsWithLocks}
>           // STEP 8. Complete mvcc.
>           mvcc.completeAndWait(writeEntry);
>           writeEntry = null;
>     
>           // STEP 9. Release region lock
>           if (locked) {
>             this.updatesLock.readLock().unlock();
>             locked = false;
>           }
>     
>           // STEP 10. Release row lock(s)
>           releaseRowLocks(acquiredRowLocks);
>     
>           // STEP 11. call postBatchMutate hook
>           processor.postBatchMutate(this);
> {code}
> {code:title=RowProcess#postBatchMutate}
>   /**
>    * The hook to be executed after the process() and applying the Mutations 
> to region. The
>    * difference of this one with {@link #postProcess(HRegion, WALEdit, 
> boolean)} is this hook will
>    * be executed before the mvcc transaction completion.
>    */
>   void postBatchMutate(HRegion region) throws IOException;
> {code}
> Do we ought to revamp the comment of RowProcess#postBatchMutate or change the 
> call order?
> I prefer the former, because the HRegion#doMiniBatchMutate() also call 
> postBatchMutate() after the mvcc transaction completion.
> Any comment? Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to