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

    https://github.com/apache/incubator-trafodion/pull/713#discussion_r79925019
  
    --- 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) {
    --- End diff --
    
    I know this code is presently commented out (and so, presumably a work in 
progress), but I'm confused by the logic that extracts the row etc. then 
doesn't do anything more with it. Is this just saving these values in the 
members of the object? If so, why do we not care about their previous state?


---
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