You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Chance Li (JIRA)" <ji...@apache.org> on 2017/12/02 16:14:00 UTC

[jira] [Comment Edited] (HBASE-18962) Support atomic BatchOperations through batchMutate()

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

Chance Li edited comment on HBASE-18962 at 12/2/17 4:13 PM:
------------------------------------------------------------

```     
 try {
        doBatchOp(builder, region, quota, mutations, cellScanner, spaceQuotaEnforcement, false);
      } catch (IOException ioe) {
        rpcServer.getMetrics().exception(ioe);
        NameBytesPair pair = ResponseConverter.buildException(ioe);
        resultOrExceptionBuilder.setException(pair);
        context.incrementResponseExceptionSize(pair.getSerializedSize());
        builder.addResultOrException(resultOrExceptionBuilder.build());
      }
```
 #resultOrExceptionBuilder.setException(pair) here maybe need replace to #builder.setException(pair)? [~uagashe] 


was (Author: chancelq):
      try {
        doBatchOp(builder, region, quota, mutations, cellScanner, spaceQuotaEnforcement, false);
      } catch (IOException ioe) {
        rpcServer.getMetrics().exception(ioe);
        NameBytesPair pair = ResponseConverter.buildException(ioe);
        resultOrExceptionBuilder.setException(pair);
        context.incrementResponseExceptionSize(pair.getSerializedSize());
        builder.addResultOrException(resultOrExceptionBuilder.build());
      }
 #resultOrExceptionBuilder.setException(pair) here maybe need replace to #builder.setException(pair)? [~uagashe] 

> Support atomic BatchOperations through batchMutate()
> ----------------------------------------------------
>
>                 Key: HBASE-18962
>                 URL: https://issues.apache.org/jira/browse/HBASE-18962
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver
>    Affects Versions: 2.0.0-alpha-3
>            Reporter: Umesh Agashe
>            Assignee: Umesh Agashe
>             Fix For: 2.0.0-beta-1
>
>         Attachments: hbase-18962.master.001.patch, hbase-18962.master.002.patch, hbase-18962.master.003.patch, hbase-18962.master.004.patch
>
>
> Support all mutations in BatchOperations to be applied atomically (all or none) by locking all rows corresponding to mutations exclusively.
> mutateRows() which uses MultiRowMutationProcessor applies all mutations atomically and batchMutate() is non-atomic. To unify code paths, isAtomic() attribute can be added to BatchOperations.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)