fmorg-git commented on code in PR #12038:
URL: https://github.com/apache/ozone/pull/12038#discussion_r4687357308
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/execution/OMExecutionFlow.java:
##########
@@ -100,12 +95,55 @@ private OMResponse submitExecutionToRatis(OMRequest
request, boolean isWrite) th
// 2. submit request to ratis
OMResponse response =
ozoneManager.getOmRatisServer().submitRequest(requestToSubmit, isWrite);
- if (!response.getSuccess() && omClientRequest != null) {
- omClientRequest.handleRequestFailure(ozoneManager);
+ if (omClientRequest != null) {
+ if (!response.getSuccess()) {
+ omClientRequest.handleRequestFailure(ozoneManager);
+ } else {
+ return postExecute(omClientRequest, request, response);
+ }
}
return response;
}
+ /**
+ * Runs post-execute steps on a successful write response served from the
Ratis retry cache.
+ */
+ public OMResponse postExecute(OMRequest request, OMResponse response) {
+ final OMClientRequest omClientRequest;
+ try {
+ omClientRequest = createClientRequest(request);
Review Comment:
updated with slightly different code
--
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]