[
https://issues.apache.org/jira/browse/IGNITE-9442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Pereslegin updated IGNITE-9442:
-------------------------------------
Description:
Method {{close()}} in collocated {{IgniteSet}} works incorrectly if cluster
includes non-affinity nodes.
Steps to reproduce:
1. Start cluster with two nodes: server and client.
2. Create {{IgniteSet}} on client node.
3. Close {{IgniteSet}} on client node.
4. Invoke {{add()}} method on closed IgniteSet.
Expected: {{add()}} throws {{IllegalStateException}}.
Actual: {{add()}} does not throws exception and puts new "orphan" element in
datastructure cache.
Alternatively to client node we can exclude server node by using cache node
filter, as shown in attached junit reproducer.
This bug relates to
[IGNITE-6346|https://issues.apache.org/jira/browse/IGNITE-6346], which also
affects usage of IgniteSet in cluster with non-affinity nodes.
was:
Simple reproducer:
{code:java}
public void testSetBlockOnCloseFromNonAffinityNode() throws Exception {
Ignite node = startGridsMultiThreaded(2);
ClusterNode locNode = node.cluster().localNode();
IgniteSet<Integer> set = node.set("test",
new CollectionConfiguration().setCollocated(true).setNodeFilter(n
-> !locNode.equals(n)));
set.close();
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
set.add(1);
return null;
}
}, IllegalStateException.class, null);
}
{code}
IgniteSet should be blocked on all nodes before cleanup data.
> Collocated IgniteSet#close is not working on non-affinity node.
> ---------------------------------------------------------------
>
> Key: IGNITE-9442
> URL: https://issues.apache.org/jira/browse/IGNITE-9442
> Project: Ignite
> Issue Type: Bug
> Components: data structures
> Affects Versions: 2.6
> Reporter: Pavel Pereslegin
> Assignee: Pavel Pereslegin
> Priority: Major
>
> Method {{close()}} in collocated {{IgniteSet}} works incorrectly if cluster
> includes non-affinity nodes.
> Steps to reproduce:
> 1. Start cluster with two nodes: server and client.
> 2. Create {{IgniteSet}} on client node.
> 3. Close {{IgniteSet}} on client node.
> 4. Invoke {{add()}} method on closed IgniteSet.
> Expected: {{add()}} throws {{IllegalStateException}}.
> Actual: {{add()}} does not throws exception and puts new "orphan" element in
> datastructure cache.
> Alternatively to client node we can exclude server node by using cache node
> filter, as shown in attached junit reproducer.
> This bug relates to
> [IGNITE-6346|https://issues.apache.org/jira/browse/IGNITE-6346], which also
> affects usage of IgniteSet in cluster with non-affinity nodes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)