You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/19 19:23:10 UTC

[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2659: HDDS-5761. should not shutdown om when setting a bigger bucket quota than volume quota

bharatviswa504 commented on a change in pull request #2659:
URL: https://github.com/apache/ozone/pull/2659#discussion_r711790848



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/utils/OzoneManagerRatisUtils.java
##########
@@ -310,9 +310,11 @@ private static OMClientRequest getOMAclRequest(OMRequest omRequest) {
    * @param exception
    * @return OzoneManagerProtocolProtos.Status
    */
-  public static Status exceptionToResponseStatus(IOException exception) {
+  public static Status exceptionToResponseStatus(Exception exception) {
     if (exception instanceof OMException) {
       return Status.values()[((OMException) exception).getResult().ordinal()];
+    } else if (exception instanceof IllegalArgumentException) {

Review comment:
       IMHO instead of changing here, the validateAndUpdateCache should not throw IllegalArgumentException and throw an OMException and set that as response status using createErrorOMResponse(omResponse, exception)
   
   In general validateAndUpdateCache should not throw any RunTimeExceptions, and it should handle errors and generate response. 




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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