sodonnel commented on code in PR #6385:
URL: https://github.com/apache/ozone/pull/6385#discussion_r1535302109


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -240,6 +240,13 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
         throw new OMException("Failed to " + action + " key, as " + dbOpenKey +
             "entry is not found in the OpenKey table", KEY_NOT_FOUND);
       }
+
+      validateOptimisticLockingOverwrite(keyToDelete, omKeyInfo, auditMap);
+      // Optimistic locking validation has passed. Now set the overwrite 
fields to null so they are
+      // not persisted in the key table.
+      omKeyInfo.setOverwriteUpdateID(null);
+      omKeyInfo.setOverwriteObjectID(null);

Review Comment:
   Adding the overwrite IDs to the commit phase is much more difficult as the 
commit is performed by various sub-classes on the client. Eg Ratis vs EC vs any 
new write class. I did look into added them only to the commit, but concluded 
it was much easier to persist them to the open key table.
   
   Therefore I prefer to keep it the way it is now.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to