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

Stephen Yuan Jiang edited comment on HBASE-17149 at 12/27/16 10:01 PM:
-----------------------------------------------------------------------

The latch is already in branch-1 - the latch is for backwards compatible (if 
old client, client in 1.0 or less, calls new master, master in 1.1 and later, 
the old client expected some assurance of certain check, that is what the latch 
for).  Here is an example of latch code in branch-1.1:
{code}
      ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch();
      procId = this.procedureExecutor.submitProcedure(
        new CreateTableProcedure(
          procedureExecutor.getEnvironment(), hTableDescriptor, newRegions, 
latch),
        nonceGroup,
        nonce);
      latch.await();
{code}


was (Author: syuanjiang):
The latch is already in branch-1, just code is a little different - the latch 
is for backwards compatible (if old client, client in 1.0 or less, calls new 
master, master in 1.1 and later, the old client expected some assurance of 
certain check, that is what the latch for).  Here is an example of latch code 
in branch-1.1:
{code}
      ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch();
      procId = this.procedureExecutor.submitProcedure(
        new CreateTableProcedure(
          procedureExecutor.getEnvironment(), hTableDescriptor, newRegions, 
latch),
        nonceGroup,
        nonce);
      latch.await();
{code}

> Procedure v2 - Fix nonce submission
> -----------------------------------
>
>                 Key: HBASE-17149
>                 URL: https://issues.apache.org/jira/browse/HBASE-17149
>             Project: HBase
>          Issue Type: Sub-task
>          Components: proc-v2
>    Affects Versions: 2.0.0, 1.3.0, 1.4.0, 1.1.7, 1.2.4
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>             Fix For: 2.0.0
>
>         Attachments: 17149.branch-1.incomplete.txt, 
> HBASE-17149.master.001.patch, HBASE-17149.master.002.patch, 
> HBASE-17149.master.002.patch, HBASE-17149.master.002.patch, 
> HBASE-17149.master.003.patch, nonce.patch
>
>
> instead of having all the logic in submitProcedure(), split in 
> registerNonce() + submitProcedure().
> In this case we can avoid calling the coprocessor twice and having a clean 
> submit logic knowing that there will only be one submission.



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

Reply via email to