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

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

Sorry this can not work because of this
bq. acquiredRowLocks[j] = getRowLockInternal(cpMutation.getRow(), true);
First of all the index 'j' assumed here will be wrong.  'j' is treated as 0 - 
#mutations from CP

{code}
for (int j = 0; j < cpMutations.length; j++) {
              Mutation cpMutation = cpMutations[j];
              Map<byte[], List<Cell>> cpFamilyMap = 
cpMutation.getFamilyCellMap();
              checkAndPrepareMutation(cpMutation, replay, cpFamilyMap, now);

              // Acquire row locks. If not, the whole batch will fail.
              acquiredRowLocks.add(getRowLockInternal(cpMutation.getRow(), 
true));
{code}
CP call can add more mutations into this batch so that all should get committed 
at once.  Said that there is a chance that the assumed size of the array also 
can be wrong.  The 0th element in the batch (Mutation) might result in more 
rows (added by the CP call)  ..  So we will have to continue with a List model.

> RowLocks use a list implementation instead of an array implementation for 
> doMiniBatchMutate
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-16468
>                 URL: https://issues.apache.org/jira/browse/HBASE-16468
>             Project: HBase
>          Issue Type: Bug
>            Reporter: John Leach
>            Assignee: John Leach
>         Attachments: HBASE-16468.txt
>
>
> Little nit, but no reason to create the extra objects.



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

Reply via email to