alievmirza commented on code in PR #3404:
URL: https://github.com/apache/ignite-3/pull/3404#discussion_r1523251134
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/FSMCallerImpl.java:
##########
@@ -283,6 +283,12 @@ public boolean onLeaderStop(final Status status) {
});
}
+ @Override
+ public boolean onBeforeLeaderStart() {
+ doBeforeLeaderStart();
Review Comment:
It seems to me that the fact, that we call `doBeforeLeaderStart()` directly,
but not through the `enqueueTask` mechanism, which is done for all leader
callbacks, could lead to the linearisability problems. For example, when we
transfer leadership, we call
`org.apache.ignite.raft.jraft.core.NodeImpl#onLeaderStop` , but if this
transferring timeouts, we return back the old leader, and we expect that
`onBeforeLeaderStart` will be called, but because we call it directly,
`onLeaderStop` could be invoked after `onBeforeLeaderStart`
--
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]