arp7 commented on a change in pull request #1174: HDDS-1856. Make required 
changes for Non-HA to use new HA code in OM.
URL: https://github.com/apache/hadoop/pull/1174#discussion_r308917239
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
 ##########
 @@ -169,15 +163,27 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
       metadataManager.getBucketTable().addCacheEntry(new CacheKey<>(bucketKey),
           new CacheValue<>(Optional.of(omBucketInfo), transactionLogIndex));
 
-
+      omResponse.setCreateBucketResponse(
+          CreateBucketResponse.newBuilder().build());
+      omClientResponse = new OMBucketCreateResponse(omBucketInfo,
+          omResponse.build());
     } catch (IOException ex) {
       exception = ex;
+      omClientResponse = new OMBucketCreateResponse(omBucketInfo,
+          createErrorOMResponse(omResponse, exception));
     } finally {
+      if (omClientResponse != null) {
+        omClientResponse.setFlushFuture(
 
 Review comment:
   Can the setFlushFuture operation be moved to the caller? I assume every 
request has to do this.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to