Github user sbroeder commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/713#discussion_r79966013
  
    --- Diff: 
core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SsccRegionEndpoint.java.tmpl
 ---
    @@ -2283,6 +2578,110 @@ CoprocessorService, Coprocessor {
     
        }
     
    +  public void checkAndDeleteRegionTx(RpcController controller,
    +                          SsccCheckAndDeleteRegionTxRequest request,
    +                          RpcCallback<SsccCheckAndDeleteRegionTxResponse> 
done) {
    +/*
    +    SsccCheckAndDeleteRegionTxResponse response = 
SsccCheckAndDeleteRegionTxResponse.getDefaultInstance();
    +
    +    byte [] rowArray = null;
    +    com.google.protobuf.ByteString row = null;
    +    com.google.protobuf.ByteString family = null;
    +    com.google.protobuf.ByteString qualifier = null;
    +    com.google.protobuf.ByteString value = null;
    +    MutationProto proto = request.getDelete();
    +    MutationType type = proto.getMutateType();
    +    Delete delete = null;
    +    Throwable t = null;
    +    WrongRegionException wre = null;
    +    int status = 0;
    +    boolean result = false;
    +    long tid = request.getTid();
    +    long startId = request.getStartId();
    +    boolean autoCommit = request.getAutoCommit();
    +
    +    java.lang.String name = ((com.google.protobuf.ByteString) 
request.getRegionName()).toStringUtf8();
    +
    +    
org.apache.hadoop.hbase.coprocessor.transactional.generated.SsccRegionProtos.SsccCheckAndDeleteRegionTxResponse.Builder
 checkAndDeleteRegionTxResponseBuilder = 
SsccCheckAndDeleteRegionTxResponse.newBuilder();
    +
    +    if (wre == null && type == MutationType.DELETE && proto.hasRow())
    +    {
    +      rowArray = proto.getRow().toByteArray();
    +
    +      try {
    +         delete = ProtobufUtil.toDelete(proto);
    +      } catch (Throwable e) {
    +         if (LOG.isTraceEnabled()) LOG.trace("checkAndDeleteRegionTx 
caught exception ", e);
    +         t = e;
    +      }
    +
    +      // Process in local memory
    +      if (delete != null && t == null)
    +      {
    +        if (request.hasRow()) {
    +          row = request.getRow();
    +
    +          if (!Bytes.equals(rowArray, request.getRow().toByteArray()))
    +            t = new 
org.apache.hadoop.hbase.DoNotRetryIOException("Action's " +
    +                 "Delete row must match the passed row");
    +        }
    +
    +        if (t == null) {
    +          if (request.hasRow())
    +            row = request.getRow();
    +          if (request.hasFamily())
    +            family = request.getFamily();
    +          if (request.hasQualifier())
    +            qualifier = request.getQualifier();
    +          if (request.hasValue())
    +            value = request.getValue();
    +
    +          try {
    +           result = checkAndDeleteRegionTx(tid, startId,
    +               request.getRow().toByteArray(),
    --- End diff --
    
    Yes, it should be caught by the throwable in the catch 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to