szetszwo commented on code in PR #10079:
URL: https://github.com/apache/ozone/pull/10079#discussion_r3091599435
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java:
##########
@@ -223,6 +224,9 @@ public SCMStateMachine getSCMStateMachine() {
@Override
public void registerStateMachineHandler(final RequestType handlerType,
final Object handler) {
+ if (handler instanceof ScmInvoker) {
+ stateMachine.registerInvoker(handlerType, (ScmInvoker) handler);
+ }
stateMachine.registerHandler(handlerType, handler);
Review Comment:
We should add `else`.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java:
##########
@@ -223,6 +224,9 @@ public SCMStateMachine getSCMStateMachine() {
@Override
public void registerStateMachineHandler(final RequestType handlerType,
final Object handler) {
+ if (handler instanceof ScmInvoker) {
+ stateMachine.registerInvoker(handlerType, (ScmInvoker) handler);
Review Comment:
You are right -- we need to pass invoker but not getImpl().
```java
registerStateMachineHandler(invoker.getType(), invoker);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]