hemantk-12 commented on code in PR #6453:
URL: https://github.com/apache/ozone/pull/6453#discussion_r1548819885


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotPurgeRequest.java:
##########
@@ -112,9 +115,16 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
       omClientResponse = new OMSnapshotPurgeResponse(omResponse.build(),
           snapshotDbKeys, updatedSnapInfos,
           updatedPathPreviousAndGlobalSnapshots);
+
+      omMetrics.incNumSnapshotPurges();
+      LOG.info("Successfully executed snapshotPurgeRequest: {{}} along with 
updating deep clean flags for " +
+              "snapshots: {} and global and previous for snapshots:{}.",
+          snapshotPurgeRequest, updatedSnapInfos.keySet(), 
updatedPathPreviousAndGlobalSnapshots.keySet());

Review Comment:
   As I said in the previous comment and you also said, audit logs are for 
user's actions/operations. I don't think it would be a good idea. If you need 
an actual request, may use the ratis log parser to get the actual request.
   
   Second, other information, such as the next active snapshot, path previous, 
and global previous updated in the purge request, won't be captured in audit 
logs because audit log will only contain the snapshots that get purged not the 
snapshots that get updated as part of the purge.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotPurgeRequest.java:
##########
@@ -112,9 +115,16 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
       omClientResponse = new OMSnapshotPurgeResponse(omResponse.build(),
           snapshotDbKeys, updatedSnapInfos,
           updatedPathPreviousAndGlobalSnapshots);
+
+      omMetrics.incNumSnapshotPurges();
+      LOG.info("Successfully executed snapshotPurgeRequest: {{}} along with 
updating deep clean flags for " +
+              "snapshots: {} and global and previous for snapshots:{}.",
+          snapshotPurgeRequest, updatedSnapInfos.keySet(), 
updatedPathPreviousAndGlobalSnapshots.keySet());

Review Comment:
   As I said in the previous comment and you also said, audit logs are for 
user's actions/operations. I don't think it would be a good idea. If you need 
an actual request, may use the ratis log parser to get the actual request.
   
   Secondly, other information, such as the next active snapshot, path 
previous, and global previous updated in the purge request, won't be captured 
in audit logs because audit log will only contain the snapshots that get purged 
not the snapshots that get updated as part of the purge.



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