errose28 commented on a change in pull request #1836:
URL: https://github.com/apache/ozone/pull/1836#discussion_r564890457



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/upgrade/OMCancelPrepareResponse.java
##########
@@ -40,5 +43,7 @@ protected void addToDBBatch(OMMetadataManager 
omMetadataManager,
     // The cancel prepare request will delete the prepare marker file and
     // update in memory state, so this response does not need to perform  DB
     // update.
+    omMetadataManager.getTransactionInfoTable().deleteWithBatch(batchOperation,

Review comment:
       Can we update the comment above this line to reflect the new usage?

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/upgrade/OMPrepareResponse.java
##########
@@ -40,5 +52,11 @@ protected void addToDBBatch(OMMetadataManager 
omMetadataManager,
       BatchOperation batchOperation) throws IOException {
     // The Prepare request will create a marker file to indicate the OM is
     // prepared, so there is no DB update for the prepare operation.
+    if (prepareIndex != -1) {

Review comment:
       Can we update the comment above to mention the marker file and the DB 
update?

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerPrepare.java
##########
@@ -427,4 +478,10 @@ private void assertRatisLogsCleared(List<OzoneManager> 
ozoneManagers)
           () -> !logFilesPresentInRatisPeer(om));
     }
   }
+
+  private void assertShouldBeAbleToPrepare() throws Exception {

Review comment:
       Nit: We can use this method in testPrepareWithoutTransactions too.




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



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

Reply via email to