DomGarguilo commented on code in PR #4160:
URL: https://github.com/apache/accumulo/pull/4160#discussion_r1453928684


##########
core/src/main/java/org/apache/accumulo/core/fate/accumulo/FateMutatorImpl.java:
##########
@@ -105,13 +108,20 @@ public FateMutator<T> putTxInfo(TxInfo txInfo, byte[] 
data) {
       case RETURN_VALUE:
         putReturnValue(data);
         break;
+      default:
+        throw new IllegalArgumentException("Unexpected TxInfo type " + txInfo);
     }
     return this;
   }
 
   @Override
   public FateMutator<T> putRepo(int position, Repo<T> repo) {
-    mutation.put(RepoColumnFamily.NAME, invertRepo(position), new 
Value(serialize(repo)));
+    final Text cq = invertRepo(position);
+    // ensure this repo is not already set
+    mutation.addCondition(new Condition(RepoColumnFamily.NAME, cq));

Review Comment:
   Using conditions, is there a way to verify that a column is present without 
knowing its value? To me it looks like we can only verify that a columns exists 
and verify that a column has a specific value, not that a column exists with 
any value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to