You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2025/04/02 03:00:00 UTC

[jira] [Updated] (HDDS-12752) Remove unnecessary Preconditions#checkArgument from OM validateAndUpdateCache

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

Ivan Andika updated HDDS-12752:
-------------------------------
    Summary: Remove unnecessary Preconditions#checkArgument from OM validateAndUpdateCache  (was: Remove Preconditions#checkArgument from OM validateAndUpdateCache)

> 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
>            Reporter: Ivan Andika
>            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-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org