sanpwc commented on code in PR #2848:
URL: https://github.com/apache/ignite-3/pull/2848#discussion_r1399146313


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItTableScanTest.java:
##########
@@ -643,12 +644,10 @@ public void testMvScan(boolean readOnly) throws Exception 
{
             Publisher<BinaryRow> publisher;
 
             if (readOnly) {
-                List<String> assignments = internalTable.assignments();
-
                 // Any node from assignments will do it.
-                ClusterNode node0 = 
CLUSTER.aliveNode().clusterNodes().stream().filter(clusterNode -> {
-                    return assignments.contains(clusterNode.name());
-                }).findFirst().orElseThrow();
+                ClusterNode node0 = 
internalTable.leaderAssignment(ThreadLocalRandom.current().nextInt(internalTable.partitions()));

Review Comment:
   According to the comment `// Any node from assignments will do it.` there's 
no need to retrieve leader, just take the first one, or random one - up to you.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to