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

Roman Puchkovskiy updated IGNITE-23029:
---------------------------------------
    Description: 
Cluster#startAndInit() starts a few nodes with startEmbeddedNode(). The latter 
adds a whenComplete() callback of node join future; the callback puts the 
started node to the nodes collection. But this callback execution is not 
awaited by anyone; startAndInit() just waits for the same node join future on 
each node. This results in a race: startAndInit() might return when some nodes 
are not yet added to the nodes collection, and the following test code might 
fail when accessing the nodes list by index.

We need to add a way to explicitly wait for the registration (that is, when the 
node is put to the nodes collection) to finish.

> Cluster#startAndInit() does not wait for node registration
> ----------------------------------------------------------
>
>                 Key: IGNITE-23029
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23029
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>
> Cluster#startAndInit() starts a few nodes with startEmbeddedNode(). The 
> latter adds a whenComplete() callback of node join future; the callback puts 
> the started node to the nodes collection. But this callback execution is not 
> awaited by anyone; startAndInit() just waits for the same node join future on 
> each node. This results in a race: startAndInit() might return when some 
> nodes are not yet added to the nodes collection, and the following test code 
> might fail when accessing the nodes list by index.
> We need to add a way to explicitly wait for the registration (that is, when 
> the node is put to the nodes collection) to finish.



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

Reply via email to