swamirishi commented on code in PR #8587:
URL: https://github.com/apache/ozone/pull/8587#discussion_r2411606021


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -218,11 +236,16 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
       deletingServiceMetrics.incrNumDirPurged(numDirsDeleted);
 
       Map<String, String> auditParams = new LinkedHashMap<>();
+      TransactionInfo transactionInfo = 
TransactionInfo.valueOf(context.getTermIndex());
       if (fromSnapshotInfo != null) {
-        
fromSnapshotInfo.setLastTransactionInfo(TransactionInfo.valueOf(context.getTermIndex()).toByteString());
+        
fromSnapshotInfo.setLastTransactionInfo(transactionInfo.toByteString());
         omMetadataManager.getSnapshotInfoTable().addCacheEntry(new 
CacheKey<>(fromSnapshotInfo.getTableKey()),
             CacheValue.get(context.getIndex(), fromSnapshotInfo));
         auditParams.put(AUDIT_PARAM_SNAPSHOT_ID, 
fromSnapshotInfo.getSnapshotId().toString());
+      } else {
+        // Update the deletingServiceMetrics with the transaction index to 
indicate the
+        // last purge transaction when running for AOS
+        deletingServiceMetrics.setLastAOSTransactionId(transactionInfo);

Review Comment:
   done



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