[JBoss JIRA] Created: (ISPN-1316) State transfer coordinator should not ask for state
by Galder Zamarreño (JIRA)
State transfer coordinator should not ask for state
---------------------------------------------------
Key: ISPN-1316
URL: https://issues.jboss.org/browse/ISPN-1316
Project: Infinispan
Issue Type: Bug
Components: State transfer
Affects Versions: 5.0.0.FINAL
Reporter: Galder Zamarreño
Assignee: Manik Surtani
Fix For: 5.1.0.ALPHA1, 5.1.0.FINAL
The coordinator of a cluster, which is the first node of the cluster can end up trying to fetch state from other nodes needlessly. For example:
1. A node starts up:
{code}15:39:20,443 DEBUG [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-2) New view accepted: [michal-linhard-12702|0] [michal-linhard-12702]{code}
2. Before state transfer check happens, a new node joins:
{code}15:39:20,735 DEBUG [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-5-thread-29) New view accepted: [michal-linhard-12702|1] [michal-linhard-12702, michal-linhard-37465, michal-linhard-61619]{code}
3. Now comes the coordinator which skips itself and sends a state trasnfer req to michal-linhard-37465:
{code}15:39:20,902 INFO [org.infinispan.remoting.rpc.RpcManagerImpl] (MSC service thread 1-4) ISPN000074: Trying to fetch state from michal-linhard-37465{code}
4. That's not right, cos 37465 is likely not gonna have anything in memory and this could potentially lead to deadlocks, where 37465 starts and request state from 12702, and in fact, that's what happens:
{code}15:39:22,611 INFO [org.infinispan.remoting.rpc.RpcManagerImpl] (MSC service thread 1-4) ISPN000074: Trying to fetch state from michal-linhard-12702{code}
5. In the mean time, as expected, 37465 writes nothing
{code}15:39:22,710 DEBUG [org.infinispan.statetransfer.StateTransferManagerImpl] (STREAMING_STATE_TRANSFER-sender-1,default,michal-linhard-37465) Writing 0 StoredEntries to stream
...
15:39:22,806 TRACE [org.infinispan.transaction.TransactionLog] (STREAMING_STATE_TRANSFER-sender-1,default,michal-linhard-37465) Writing 0 pending prepares to the stream{code}
In other words, in the current design, the coordinator should not go around asking for state.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira