[ 
https://issues.apache.org/jira/browse/IGNITE-4111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719953#comment-16719953
 ] 

Amelchev Nikita commented on IGNITE-4111:
-----------------------------------------

[~ascherbakov], Thank you for reporting this issue!

I still can't get the NPE with the reproducer and on TC it doesn't fail too 
([tests 
log|https://ci.ignite.apache.org/viewLog.html?buildId=2522954&tab=buildResultsDiv&buildTypeId=IgniteTests24Java8_Cache9#testNameId-3818521143170875066]).

But I have investigated the issue and problem is that anyone client tries to 
connect to this node by communication SPI before disco SPI initialized 
implementation. There is a question about how other nodes try to connect to a 
node that is not in topology yet.
In any case, this is a bug and I have prepared the fix and direct reproducer. 
This method called for compatibility resolving. In the fix, it will return 
empty collections of nodes until impl initialized.

[~agoncharuk], could you take a look [at 
PR|https://github.com/apache/ignite/pull/5650], please?

> Communication fails to send message if target node did not finish join process
> ------------------------------------------------------------------------------
>
>                 Key: IGNITE-4111
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4111
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>            Reporter: Semen Boikov
>            Assignee: Amelchev Nikita
>            Priority: Minor
>             Fix For: 2.8
>
>         Attachments: test onFirstMessage hang.log
>
>
> Currently this scenario is possible:
> - joining node sent join request and waits for 
> TcpDiscoveryNodeAddFinishedMessage inside ServerImpl.joinTopology
> - others nodes already see this node and can send messages to it (for example 
> try to run compute job on this node)
> - joining node can not receive message: TcpCommunicationSpi will hang inside 
> 'onFirstMessage' on 'getSpiContext' call, so sending node will get error 
> trying to establish connection
> Possible fix: if in onFirstMessage() spi context is not available, then 
> TcpCommunicationSpi  should send special response which indicates that this 
> node is not ready yet, and sender should retry after some time.
> Also need check internal code for places where message can be unnecessarily 
> sent to node: one such place is 
> GridCachePartitionExchangeManager.refreshPartitions - message is sent to all 
> known nodes, but here we can filter by node order / finished exchage version.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to