[
https://issues.apache.org/jira/browse/HDDS-8856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737458#comment-17737458
]
Sumit Agrawal commented on HDDS-8856:
-------------------------------------
[~tanvipenumudy] As discussed, this issue comes when,
* One of OM is upgraded to serve new request type, but other OM is still old
* So while handling ratis transaction, it will receive IllegalStateException
and causes crash of the OM as this exception is not handled.
This is not possible in normal scenario as suggested to upgrade all OM together.
To fix, can use IOException or its sub-types which is handled to return failure.
> Client sending an unknown request should not crash OM
> -----------------------------------------------------
>
> Key: HDDS-8856
> URL: https://issues.apache.org/jira/browse/HDDS-8856
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Tanvi Penumudy
> Assignee: Tanvi Penumudy
> Priority: Major
> Labels: pull-request-available
>
> The following call stack was noticed while testing out a new command. If the
> server sees an unknown request, it should reject it instead of raising an
> exception and crashing.
> {code:java}
> java.lang.IllegalStateException: Unrecognized write command type
> requestEchoRPC
> at
> org.apache.hadoop.ozone.om.ratis.utils.OzoneManagerRatisUtils.createClientRequest(OzoneManagerRatisUtils.java:308)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerRequestHandler.handleWriteRequest(OzoneManagerRequestHandler.java:335)
> at
> org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.runCommand(OzoneManagerStateMachine.java:533)
> at
> org.apache.hadoop.ozone.om.ratis.OzoneManagerStateMachine.lambda$1(OzoneManagerStateMachine.java:324)
> at
> java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834){code}
> From OzoneManagerRatisUtils.java
> {code:java}
> default:
> throw new IllegalStateException("Unrecognized write command " +
> "type request" + cmdType);
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]