phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3789) Execute cross region index maintenance calls in postBatchMutateIndispensably
Date Sat, 15 Apr 2017 19:21:41 GMT

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

Andrew Purtell commented on PHOENIX-3789:
-----------------------------------------

postBatchMutate is called before we update the MVCC read point and before we either do rollbackMemstore
or addAndGetGlobalMemstoreSize.

postBatchMutateIndispensably is called after almost everything, in the finally block.  

Excessive delay in postBatchMutateIndispensably would still be bad. We'd still eventually
tie up a bunch of handlers and clients would have trouble making progress. However it would
affect other internals less. 

{code}
doMiniBatchMutation {
  try {

    // everything else including drop row locks, read lock

    postBatchMutate   <=== STUCK HERE on RS-RS index update deadlock

    // advance MVCC

  } finally {

      // cleanups, finalization, adjust memstore accounting

      if (coprocessorHost != null && !batchOp.isInReplay()) {
        // call the coprocessor hook to do any finalization steps                        
          
	// after the put is done                                                                
   
        MiniBatchOperationInProgress<Mutation> miniBatchOp =
            new MiniBatchOperationInProgress<Mutation>(batchOp.getMutationsForCoprocs(),
                batchOp.retCodeDetails, batchOp.walEditsFromCoprocessors, firstIndex,
                lastIndexExclusive);
        coprocessorHost.postBatchMutateIndispensably(miniBatchOp, success); <=== IF WE
GET STUCK HERE INSTEAD OBSERVED BEHAVIOR WILL CHANGE
      }

      batchOp.nextIndexToProcess = lastIndexExclusive;
    }
}
{code}


> Execute cross region index maintenance calls in postBatchMutateIndispensably
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-3789
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3789
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>             Fix For: 4.11.0, 4.10.1
>
>         Attachments: PHOENIX-3789.patch, PHOENIX-3789_v2.patch
>
>
> Making cross region server calls while the row is locked can lead to a greater chance
of resource starvation. We can use the postBatchMutateIndispensably hook instead of the postBatchMutate
call for our processing.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message