bharatviswa504 commented on a change in pull request #428: HDDS-2868. Add 
ObjectID and UpdateID to OMKeyInfo.
URL: https://github.com/apache/hadoop-ozone/pull/428#discussion_r366028051
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyDeleteRequest.java
 ##########
 @@ -126,6 +126,8 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
       if (omKeyInfo == null) {
         throw new OMException("Key not found", KEY_NOT_FOUND);
       }
+      // Set the UpdateID to current transactionLogIndex
+      omKeyInfo.setUpdateID(transactionLogIndex);
 
 Review comment:
   I think, we don't need to set updateID, as we delete this entry from 
KeyTable anyway. (As we set Optional.absent() below, which will be deleted from 
OM DB eventually when double buffer picks). Or is there any scenario by setting 
this helps.
   
   Example: Create key Key1 - 1, Delete Key Key1 - 2 Create Key Key1 (again) - 
3 Now replay happening from 1, as now in KeyTable it will have updateID 3, we 
think it as replay just by checking OmKeyInfo.getUpdateID, similar to 
Bucket/Volume delete.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to