[ 
https://issues.apache.org/jira/browse/IGNITE-24056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roman Puchkovskiy updated IGNITE-24056:
---------------------------------------
    Description: 
If a Raft state machine (represented with a RaftGroupListener) starts executing 
a batch of commands which is huge, there is no way to stop it midway (apart 
from closing a storage it interacts with). This, among other things, does not 
allow us to stop an Ignite node timely if some Raft node recovers from a huge 
Raft log.

Here is how we can do it:
 # As soon as Raft node's shutdown is initiated, make the currently executed 
iterator return false from hasNext()
 # When such an iterator 'finishes', complete all command closures that were 
not handled due to an early stop with a ShutdownException
 # It is enough to have a volatile boolean in FSMCallerImpl; it will indicate 
the shutdown is initiated
 # This will make busy locks in listeners obsolete

  was:
If a Raft state machine (represented with a RaftGroupListener) starts executing 
a batch of commands which is huge, there is no way to stop it midway (apart 
from closing a storage it interacts with). This, among other things, does not 
allow us to stop an Ignite node timely if some Raft node recovers from a huge 
Raft log.

Here is how we can do it:
 # As soon as Raft node's shutdown is initiated, make the currently executed 
iterator return false from hasNext()
 # When such an iterator 'finishes', complete all command closures that were 
not handled due to an early stop with a ShutdownException


> Prompt stop of Raft state machines
> ----------------------------------
>
>                 Key: IGNITE-24056
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24056
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>
> If a Raft state machine (represented with a RaftGroupListener) starts 
> executing a batch of commands which is huge, there is no way to stop it 
> midway (apart from closing a storage it interacts with). This, among other 
> things, does not allow us to stop an Ignite node timely if some Raft node 
> recovers from a huge Raft log.
> Here is how we can do it:
>  # As soon as Raft node's shutdown is initiated, make the currently executed 
> iterator return false from hasNext()
>  # When such an iterator 'finishes', complete all command closures that were 
> not handled due to an early stop with a ShutdownException
>  # It is enough to have a volatile boolean in FSMCallerImpl; it will indicate 
> the shutdown is initiated
>  # This will make busy locks in listeners obsolete



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to