pavlukhin commented on a change in pull request #7277:
URL: https://github.com/apache/ignite/pull/7277#discussion_r463593606
##########
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:
Still I suppose that reporting an issue in
https://issues.apache.org/jira/projects/IGNITE/issues is a proper option. If
you would like to contribute a fix it would be awesome. Unfortunately I will
not have a time to fix this problem in near future, sorry for that.
----------------------------------------------------------------
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]