You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/30 17:41:27 UTC

[GitHub] [hadoop] bharatviswa504 commented on a change in pull request #1225: HDDS-1909. Use new HA code for Non-HA in OM.

bharatviswa504 commented on a change in pull request #1225: HDDS-1909. Use new HA code for Non-HA in OM.
URL: https://github.com/apache/hadoop/pull/1225#discussion_r319612984
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
 ##########
 @@ -115,7 +119,36 @@ public OMResponse submitRequest(RpcController controller,
           }
         }
       } else {
-        return submitRequestDirectlyToOM(request);
+        OMClientResponse omClientResponse = null;
+        long index = 0L;
+        try {
+          OMClientRequest omClientRequest =
+              OzoneManagerRatisUtils.createClientRequest(request);
+          if (omClientRequest != null) {
+            request = omClientRequest.preExecute(ozoneManager);
+            index = transactionIndex.incrementAndGet();
+            omClientRequest =
+                OzoneManagerRatisUtils.createClientRequest(request);
+            omClientResponse =
+                omClientRequest.validateAndUpdateCache(ozoneManager, index,
+                    ozoneManagerDoubleBuffer::add);
+          } else {
+            return submitRequestDirectlyToOM(request);
+          }
+        } catch(IOException ex) {
+          // As some of the preExecute returns error. So handle here.
 
 Review comment:
   validateAndUpdateCache never throws IOException.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org