aswinshakil commented on code in PR #4486:
URL: https://github.com/apache/ozone/pull/4486#discussion_r1151217165
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java:
##########
@@ -64,10 +74,27 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager,
}
}
- omClientResponse = new OMKeyPurgeResponse(omResponse.build(),
- keysToBePurgedList);
- addResponseToDoubleBuffer(trxnLogIndex, omClientResponse,
- omDoubleBufferHelper);
+ try {
+ OmSnapshot omFromSnapshot = null;
+ if (fromSnapshot != null) {
+ SnapshotInfo snapshotInfo =
+ ozoneManager.getMetadataManager().getSnapshotInfoTable()
+ .get(fromSnapshot);
+ omFromSnapshot = (OmSnapshot) omSnapshotManager
+ .checkForSnapshot(snapshotInfo.getVolumeName(),
+ snapshotInfo.getBucketName(),
+ getSnapshotPrefix(snapshotInfo.getName()));
+ }
+
Review Comment:
The problem is `OmSnapshotManager` is not part of `OMMetadataManager` and it
is part of `OzoneManager` so we won't be able to get `OmSnapshot` in
`OMKeyPurgeResponse` as it only has `OMMetadataManager`
--
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]