swamirishi commented on code in PR #7179:
URL: https://github.com/apache/ozone/pull/7179#discussion_r1753027829
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java:
##########
@@ -71,17 +75,27 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager, TermIn
keysToBePurgedList.add(deletedKey);
}
}
+ final SnapshotInfo fromSnapshotInfo;
try {
- SnapshotInfo fromSnapshotInfo = null;
- if (fromSnapshot != null) {
- fromSnapshotInfo = SnapshotUtils.getSnapshotInfo(ozoneManager,
fromSnapshot);
- }
- omClientResponse = new OMKeyPurgeResponse(omResponse.build(),
- keysToBePurgedList, fromSnapshotInfo, keysToUpdateList);
+ fromSnapshotInfo = fromSnapshot == null ? null :
SnapshotUtils.getSnapshotInfo(ozoneManager, fromSnapshot);
} catch (IOException ex) {
- omClientResponse = new
OMKeyPurgeResponse(createErrorOMResponse(omResponse, ex));
+ return new OMKeyPurgeResponse(createErrorOMResponse(omResponse, ex));
+ }
Review Comment:
In the next PR, I have a code block which needs a separate exception
handling block
--
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]