Ivan Andika created HDDS-12752:
----------------------------------

             Summary: Remove 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


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.

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