Kirill Tkalenko created IGNITE-20062:
----------------------------------------

             Summary: Temporary fix for StackOverflowError in 
Replica#waitForActualState when a peer leaves
                 Key: IGNITE-20062
                 URL: https://issues.apache.org/jira/browse/IGNITE-20062
             Project: Ignite
          Issue Type: Improvement
            Reporter: Kirill Tkalenko
            Assignee: Kirill Tkalenko
             Fix For: 3.0.0-beta2


It has been found that when a peer leaves, 
*org.apache.ignite.internal.replicator.Replica#waitForActualState* can generate 
 *StackOverflowError* that can lead to unpleasant consequences.

For example, as a result of an *StackOverflowError*, we will not be able to 
execute *busyLock.leaveBusy();* in 
*org.apache.ignite.internal.raft.RaftGroupServiceImpl#sendWithRetry(org.apache.ignite.internal.raft.Peer,
 java.util.function.Function<org.apache.ignite.internal.raft.Peer,? extends 
org.apache.ignite.network.NetworkMessage>, long, 
java.util.concurrent.CompletableFuture<R>)*, because the stack is full and when 
entering to *leaveBusy*, *StackOverflowError* will be thrown again, which will 
lead to freezing at the node stop.

At the moment I don't know how to fix this properly, while a temporary solution 
comes to mind - add thread pool and use it instead of *Runnable::run* in 
*Replica#waitForActualState*, you need to properly fix it in 123.



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

Reply via email to