You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/11/15 06:55:13 UTC

[GitHub] [ignite-3] ascherbakoff commented on a change in pull request #400: IGNITE-15085

ascherbakoff commented on a change in pull request #400:
URL: https://github.com/apache/ignite-3/pull/400#discussion_r749045342



##########
File path: modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java
##########
@@ -66,67 +68,112 @@ public ActionRequestProcessor(Executor executor, RaftMessagesFactory factory) {
             return;
         }
 
-        if (request.command() instanceof WriteCommand) {
-            node.apply(new Task(ByteBuffer.wrap(JDKMarshaller.DEFAULT.marshall(request.command())),
-                new CommandClosureImpl<>(request.command()) {
-                    @Override public void result(Serializable res) {
-                        rpcCtx.sendResponse(factory.actionResponse().result(res).build());
-                    }
+        JRaftServerImpl.DelegatingStateMachine fsm = (JRaftServerImpl.DelegatingStateMachine) node.getOptions().getFsm();
 
-                    @Override public void run(Status status) {
-                        assert !status.isOk() : status;
+        // Apply a filter before commiting to STM.
+        CompletableFuture<Void> fut = fsm.getListener().onBeforeApply(request.command());

Review comment:
       It's called only on the leader.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org