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


##########
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:
   cause i found that InternalTable#assignments (which marked under this issue 
too) is used from 2 places, one is that test and other - from client code which 
will be fixed by another issue, if this method is deprecated too can u suggest 
correct approach here ?



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