[
https://issues.apache.org/jira/browse/IGNITE-16375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17482210#comment-17482210
]
Sergey Korotkov commented on IGNITE-16375:
------------------------------------------
I have analysed the issue.
There are several fuctions to start the client nodes with different set of
parameters. But only two of them do real start. Others just call these two.
The first one *_startClientGrid(cfg)_* gets the ignite configuration as a
parameter and forces the client mode explicitely.
The second one *_startClientGrid(name)_* obtains the ignite configuration via
the protected _*getConfiguration(name)*_ method which can be overriden by the
test. And tries to force client mode implicitely just by calling the
IgnitioEx.setClientMode(true) which may be completely ignored by the test.
Summary is in the below table:
||Function||Calls to do real work||Does real start||Set client mode via||How
get the cfg||Affected by the issue||
|{color:#00875a}startClientGrid(name, cfg){color}|{color:#00875a} ->
startClientGrid(cfg){color}| | | |{color:#00875a}No{color}|
|{color:#00875a}startClientGrid(cfg){color}|{color:#00875a} ->
startGrid(cfg){color}|{color:#00875a}Yes{color}|{color:#00875a}cfg.setClientMode(true){color}|{color:#00875a}via
parameter{color}|{color:#00875a}No{color}|
|{color:#de350b}startClientGridsMultiThreaded{color}|{color:#de350b} ->
startClientGrid(idx){color}| | | |{color:#de350b}Yes{color}|
|{color:#de350b}startClientGrid(){color}|{color:#de350b} ->
startClientGrid(name){color}| | | |{color:#de350b}Yes{color}|
|{color:#de350b}startClientGrid(idx){color}|{color:#de350b} ->
startClientGrid(name){color}| | | |{color:#de350b}Yes{color}|
|{color:#de350b}startClientGrid(idx, dep_rslvr){color}|{color:#de350b} ->
startClientGrid(name){color}| | | |{color:#de350b}Yes{color}|
|{color:#de350b}startClientGrid(name){color}|{color:#de350b} ->
startGrid(name){color}|{color:#de350b}Yes{color}|{color:#de350b}IgnitionEx.setClientMode(true){color}|{color:#de350b}devegates
to getConfiguration(name){color}|{color:#de350b}Yes{color}|
---
[~av] So the question is do we want to have two different behaviour for
starting client nodes? One which just forces the client mode and the second
which produces the exception. Does it make sence to just force the client mode
in both cases?
> GridAbstractTest.startClientGrid() method does not guarantee that started
> node will be the client
> -------------------------------------------------------------------------------------------------
>
> Key: IGNITE-16375
> URL: https://issues.apache.org/jira/browse/IGNITE-16375
> Project: Ignite
> Issue Type: Bug
> Reporter: Anton Vinogradov
> Assignee: Sergey Korotkov
> Priority: Major
> Labels: newbie
> Attachments: Client_node_start_failed_reproducer.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If {{cfg.setClientMode(false)}} was applied to the Ignite configuration,
> {{GridAbstractTest.startClientGrid()}} will start the server node, while
> client node is expected according to the method name and JavaDoc.
> {noformat}
> Starts new client grid with given index.
> {noformat}
> {{GridAbstractTest.startClientGrid()}} should start client node even when
> {{cfg.setClientMode(false)}} is set or throw an exception (preferred).
> See reproducer at [^Client_node_start_failed_reproducer.patch]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)