[
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 check from OM
validateAndUpdateCache (was: Remove unnecessary Preconditions#checkArgument
from OM validateAndUpdateCache)
> Remove unnecessary Preconditions check 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 irrecoverable OM corruption
> or it will cause one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]