cshannon commented on code in PR #4204:
URL: https://github.com/apache/accumulo/pull/4204#discussion_r1477420461


##########
core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java:
##########
@@ -91,6 +94,27 @@ public long create() {
     }
   }
 
+  @Override
+  protected void create(long tid, byte[] key) {
+    // TODO: Should we somehow make this Atomic or clean up on failure to make 
sure
+    // that either both of these writes happen or none happen?
+    try {
+      zk.putPersistentData(getTXPath(tid), TStatus.NEW.name().getBytes(UTF_8),
+          NodeExistsPolicy.FAIL);
+      // The key was already used to generate the tid but we still need to 
store it
+      // separate to check later for collision detection
+      zk.putPersistentData(getTXPath(tid) + "/" + TxInfo.TX_KEY, 
serializeTxInfo(key),

Review Comment:
   This is now atomic in the latest updats



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to