[jira] [Updated] (IGNITE-18766) Incorrect id check in ClusterGroupAdapter.forNodeId

2023-04-07 Thread Dmitry Pavlov (Jira)


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

Dmitry Pavlov updated IGNITE-18766:
---
Labels: ise newbie  (was: newbie)

> Incorrect id check in ClusterGroupAdapter.forNodeId
> ---
>
> Key: IGNITE-18766
> URL: https://issues.apache.org/jira/browse/IGNITE-18766
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.14
>Reporter: Pavel Tupitsyn
>Assignee: Denis Kuznetsov
>Priority: Minor
>  Labels: ise, newbie
> Fix For: 2.15
>
>
> ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:
> {code:java}
> for (UUID id0 : ids) {
> if (contains(id))
> nodeIds.add(id0);
> }
> {code}
> https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461
> The following unit test demonstrates the problem:
> {code:java}
> @Test
> public void testProjectionWithBadId() {
> ClusterNode locNode = ignite.cluster().localNode();
> ClusterGroup prj = ignite.cluster().forNodeId(UUID.randomUUID(), 
> locNode.id());
> Collection nodes = prj.nodes();
> assertEquals(1, nodes.size());
> }
> {code}
> (add to GridProjectionForCachesSelfTest)



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


[jira] [Updated] (IGNITE-18766) Incorrect id check in ClusterGroupAdapter.forNodeId

2023-02-08 Thread Pavel Tupitsyn (Jira)


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

Pavel Tupitsyn updated IGNITE-18766:

Description: 
ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:

{code:java}
for (UUID id0 : ids) {
if (contains(id))
nodeIds.add(id0);
}
{code}

https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461

The following unit test demonstrates the problem:


{code:java}
@Test
public void testProjectionWithBadId() {
ClusterNode locNode = ignite.cluster().localNode();

ClusterGroup prj = ignite.cluster().forNodeId(UUID.randomUUID(), 
locNode.id());
Collection nodes = prj.nodes();

assertEquals(1, nodes.size());
}
{code}

(add to GridProjectionForCachesSelfTest)

  was:
ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:

{code:java}
for (UUID id0 : ids) {
if (contains(id))
nodeIds.add(id0);
}
{code}

https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461

The following unit test demonstrates the problem:


> Incorrect id check in ClusterGroupAdapter.forNodeId
> ---
>
> Key: IGNITE-18766
> URL: https://issues.apache.org/jira/browse/IGNITE-18766
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.14
>Reporter: Pavel Tupitsyn
>Priority: Minor
>  Labels: newbie
> Fix For: 2.15
>
>
> ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:
> {code:java}
> for (UUID id0 : ids) {
> if (contains(id))
> nodeIds.add(id0);
> }
> {code}
> https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461
> The following unit test demonstrates the problem:
> {code:java}
> @Test
> public void testProjectionWithBadId() {
> ClusterNode locNode = ignite.cluster().localNode();
> ClusterGroup prj = ignite.cluster().forNodeId(UUID.randomUUID(), 
> locNode.id());
> Collection nodes = prj.nodes();
> assertEquals(1, nodes.size());
> }
> {code}
> (add to GridProjectionForCachesSelfTest)



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


[jira] [Updated] (IGNITE-18766) Incorrect id check in ClusterGroupAdapter.forNodeId

2023-02-08 Thread Pavel Tupitsyn (Jira)


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

Pavel Tupitsyn updated IGNITE-18766:

Affects Version/s: 2.14

> Incorrect id check in ClusterGroupAdapter.forNodeId
> ---
>
> Key: IGNITE-18766
> URL: https://issues.apache.org/jira/browse/IGNITE-18766
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.14
>Reporter: Pavel Tupitsyn
>Priority: Minor
>  Labels: newbie
> Fix For: 2.15
>
>
> ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:
> {code:java}
> for (UUID id0 : ids) {
> if (contains(id))
> nodeIds.add(id0);
> }
> {code}
> https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461
> The following unit test demonstrates the problem:



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


[jira] [Updated] (IGNITE-18766) Incorrect id check in ClusterGroupAdapter.forNodeId

2023-02-08 Thread Pavel Tupitsyn (Jira)


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

Pavel Tupitsyn updated IGNITE-18766:

Ignite Flags: Release Notes Required  (was: Docs Required,Release Notes 
Required)

> Incorrect id check in ClusterGroupAdapter.forNodeId
> ---
>
> Key: IGNITE-18766
> URL: https://issues.apache.org/jira/browse/IGNITE-18766
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.14
>Reporter: Pavel Tupitsyn
>Priority: Minor
>  Labels: newbie
> Fix For: 2.15
>
>
> ClusterGroup.forNodeId checks *id* in a loop instead of *id0*:
> {code:java}
> for (UUID id0 : ids) {
> if (contains(id))
> nodeIds.add(id0);
> }
> {code}
> https://github.com/apache/ignite/blob/3de1dc44f53ea510328badf6cb6b423fe6975bd8/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java#L461
> The following unit test demonstrates the problem:



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