[ 
https://issues.apache.org/jira/browse/HDDS-12752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Chuan Yu reassigned HDDS-12752:
------------------------------------

    Assignee: Chia-Chuan Yu

> Remove unnecessary Preconditions#checkArgument from OM validateAndUpdateCache
> -----------------------------------------------------------------------------
>
>                 Key: HDDS-12752
>                 URL: https://issues.apache.org/jira/browse/HDDS-12752
>             Project: Apache Ozone
>          Issue Type: Task
>          Components: OM
>            Reporter: Ivan Andika
>            Assignee: Chia-Chuan Yu
>            Priority: Minor
>
> Currently, we have some Preconditions#checkArgument and 
> Preconditions#checkNotNull called inside 
> OMClientRequest#validateAndUpdateCache which will throw unchecked exceptions 
> and crash the OM. This is because OMClientRequest#validateAndUpdateCache is 
> called inside the Ratis StateMachineUpdater which is in charge of applying 
> the commited Raft log sequentially.
> For example OMKeyRequest#prepareMultipartFileInfo contains 
> Preconditions#checkArgument that the multipartNumber in KeyArgs needs to be > 
> 0. This will throw unchecked exceptions which will crash the OM, although 
> throwing an OMException would have suffice. Although AWS S3 SDK client most 
> probably have an internal check, other S3 SDK might not have this check and 
> will simply defer it to the server-side, which will crash OM.
> We need to remove the unnecessary Preconditions and only use it if the 
> Preconditions failure means there is already an unrecoverable OM corruption.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to