sumanentc commented on a change in pull request #7277:
URL: https://github.com/apache/ignite/pull/7277#discussion_r459864407
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
##########
@@ -654,12 +655,22 @@ private boolean isSafeLossPolicy() {
if (prj != null || part != null)
return nodes(cctx, prj, part);
- if (cctx.affinityNode())
+ if (cctx.affinityNode() &&
!cctx.topology().localPartitionMap().hasMovingPartitions())
return Collections.singletonList(cctx.localNode());
Collection<ClusterNode> affNodes = nodes(cctx, null, null);
- return affNodes.isEmpty() ? affNodes :
Collections.singletonList(F.rand(affNodes));
+ List<ClusterNode> nodes = new ArrayList<>(affNodes);
+
+ Collections.shuffle(nodes);
+
+ for (ClusterNode node : nodes) {
+ if
(!cctx.topology().partitions(node.id()).hasMovingPartitions()) {
Review comment:
!cctx.topology().partitions(node.id()).hasMovingPartitions() is throwing
Nullpointer exception at runtime for non-pationed Cache and the Cluster starts
without any Cache and then Cline Node join and populate the Cache.
cctx.topology().partitions(node.id()) is returning null
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]