JAkutenshi commented on code in PR #3633:
URL: https://github.com/apache/ignite-3/pull/3633#discussion_r1594542696


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/ExecutorInclinedRaftCommandRunner.java:
##########
@@ -46,4 +46,8 @@ public <R> CompletableFuture<R> run(Command cmd) {
 
         return future.thenApplyAsync(identity(), completionExecutor);
     }
+
+    public RaftCommandRunner decoratedCommandRunner() {

Review Comment:
   ✅ A good question to revise for me. So:
   1. The one of primary goals was to make a hole for `RaftGroupManager` from 
`ReplicaListener` through `Replica` and `ReplicaManager` to `TableManager`.
   2. Then, I should have a chain of `.raftClien()` among that classes.
   3. There is a problem: `RaftClient` has raft client as `RaftCommandRunner` 
instead `RaftGroupManager`. And the problem is that command runner interface is 
appliable for both raft client and for the discussed command runner that is a 
decorator. But the last class isn't exactly raft client. Then, there should be 
a workaround for `raftClient` implementation in `ReplicaListener`:
   ```java
       @Override
       public RaftCommandRunner raftClient() {
           if (raftClient instanceof ExecutorInclinedRaftCommandRunner) {
               return ((ExecutorInclinedRaftCommandRunner) 
raftClient).decoratedCommandRunner();
           }
           return raftClient;
       }
   ```
   



-- 
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]

Reply via email to