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

Nicolas Liochon commented on HBASE-10942:
-----------------------------------------

Unrelated to this patch, but related to multiget & replica
{code}
In AsyncProcess#receiveGlobalFailure
          if (firstAction) {  // <============== always false
            firstAction = false;  
            isReplica = 
!RegionReplicaUtil.isDefaultReplica(action.getReplicaId());
          }

   // [...]
   //    isReplica is always false here
      if (toReplay.isEmpty()) {
        logNoResubmit(server, numAttempt, rsActions.size(), t, isReplica, 
failed, stopped);
      } else {
        resubmit(server, toReplay, numAttempt, rsActions.size(), t, isReplica, 
selfTi);
      }
{code}

{code}
AsyncProcess#receiveMultiAction
Same as AsyncProcess#receiveGlobalFailure 
{code}

Nits:
bq. if (0 == ti.actionCount) {
yoda style spotted :-)

bq. if (e instanceof InterruptedIOException && (validateInterrupt() == null)) 
return;
Either it's very smart, either it's wrong, as a SocketTimeoutException is a 
IIOE. ExceptionUtil contains a method to check a Throwable.

bq. // If we use interruption, we'll have to pre-create the syncronization 
structure
Typo on syncronization

bq. validateInterrupt
I don't really understand what this method is doing. Some comments would be 
great.

bq.     private void groupAndSendMultiAction(List<Action<Row>> currentActions, 
int numAttempt, ThreadInfo selfTi) {
The javadoc should be updated here.

Not nit:
I think that useInterrupt should not be an option. It doubles the test cases, 
and it's not consistent with the simple get code.

The code is quite complex. Removing useInterruption will make it a little 
simpler. I'm not sure it will be enough to make it reasonably easy to 
understand.... There is as well some confusion between the Threads and and the 
future: we're cancelling tasks, not killing threads. I tend to think that it 
would be easier to read with a specific CompletionService?





> support parallel request cancellation for multi-get
> ---------------------------------------------------
>
>                 Key: HBASE-10942
>                 URL: https://issues.apache.org/jira/browse/HBASE-10942
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>             Fix For: hbase-10070
>
>         Attachments: HBASE-10942.01.patch, HBASE-10942.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to