bharatviswa504 commented on a change in pull request #821: HDDS-3374. Addendum: 
OMVolumeSetOwnerRequest doesn't check if user is already the owner
URL: https://github.com/apache/hadoop-ozone/pull/821#discussion_r408503405
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetOwnerRequest.java
 ##########
 @@ -147,18 +145,20 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
           .setMessage(
             "Volume '" + volume + "' owner is already '" + newOwner + "'.")
           .setSuccess(false);
-        return new OMVolumeSetOwnerResponse(omResponse.build());
+        omResponse.setSetVolumePropertyResponse(
+            SetVolumePropertyResponse.newBuilder().build());
+        omClientResponse = new OMVolumeSetOwnerResponse(omResponse.build());
+        addResponseToDoubleBuffer(transactionLogIndex, omClientResponse,
+            ozoneManagerDoubleBufferHelper);
+        return omClientResponse;
 
 Review comment:
   Instead of return response here, set it to omClientResponse, and let finally 
block take care of it.

----------------------------------------------------------------
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