Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4
-
None
Description
How to reproduce:
1)Create new server node and activate the cluster (run the StartOneServerAndActivate.java example)
2)Create another server node. (run the StartSecondServerNode.java example after step 1)
3)Create client node that will create new replicated cache, put some values and try to get the cache iterator. (run the StartClientNode.java example)
In this case you should see the log like that:
Elements in cache: 0
**************************
**************************
**************************
**************************
Elements in cache: 1000
**************************
**************************
**************************
**************************
Elements in cache: 1000
**************************
**************************
**************************
**************************
Elements in cache: 0
**************************
**************************
**************************
**************************
Elements in cache: 0
**************************
**************************
It means that sometime we see the cache values and sometime we do not. It happens because second node isn't in the baseline topology. In this case all data was stored to first server node and it's ok.
The problem here is that when we ask for the iterator then we choose the node that contains the required cache and send to it scan query. At the moment we can choose the node in baseline topology (with data) and empty node. Looks like this behavior should be changed.
Incorrect logic located at GridCacheQueryAdapter.java at "private Collection<ClusterNode> nodes() throws IgniteCheckedException" method:
case REPLICATED: if (prj != null || part != null) return nodes(cctx, prj, part); if (cctx.affinityNode()) return Collections.singletonList(cctx.localNode()); Collection<ClusterNode> affNodes = nodes(cctx, null, null); //HERE WE HAVE BOTH NODES AT affNodes return affNodes.isEmpty() ? affNodes : Collections.singletonList(F.rand(affNodes))
Attachments
Attachments
Issue Links
- Dependency
-
IGNITE-8380 Affinity node calculation doesn't take into account BLT
- In Progress
-
IGNITE-7628 SqlQuery hangs indefinitely with additional not registered in baseline node.
- Resolved