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-16989) RowProcess#postBatchMutate doesn’t be executed before the mvcc transaction completion
Date Wed, 02 Nov 2016 08:24:58 GMT

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

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

When the postBatch hook added in RowProcess, the order was as mentioned in the javadoc.  That
is the diff for this with postProcess. So now both these APIs are same?
So 15158, changed the order.  The postBatchMutate hook is called after the completion of the
mutation and even it is visible to readers. (MVCC is completed).  I think that is against
the agreement of this CP hook also.  cc [~saint.ack@gmail.com].   Not sure how CP users use
this API.

> 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
>            Reporter: ChiaPing Tsai
>            Priority: Minor
>
> 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)

Mime
View raw message