sashapolo commented on code in PR #2698:
URL: https://github.com/apache/ignite-3/pull/2698#discussion_r1371642423
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -587,6 +587,59 @@ void testRebalanceWithTheSameNodes() throws Exception {
verifyThatRaftNodesAndReplicasWereStartedOnlyOnce();
}
+ @Test
+ void testRaftClientsUpdatesAfterRebalance() throws Exception {
+ Node node = getNode(0);
+
+ createZone(node, ZONE_NAME, 1, 1);
+
+ createTable(node, ZONE_NAME, TABLE_NAME);
+
+ assertTrue(waitForCondition(() -> getPartitionClusterNodes(node,
0).size() == 1, AWAIT_TIMEOUT_MILLIS));
+
+ Set<Assignment> assignmentsBeforeRebalance =
getPartitionClusterNodes(node, 0);
+
+ Node newNodeForAssignment = nodes.stream().filter(n ->
+
!assignmentsBeforeRebalance.contains(Assignment.forPeer(n.clusterService.nodeName()))).findFirst().get();
+
+ Set<Assignment> newAssignment =
Set.of(Assignment.forPeer(newNodeForAssignment.clusterService.nodeName()));
+
+ // Write the new assignments to metastore as a pending assignments.
+ {
Review Comment:
it's ok if you like it, just a matter of taste
--
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]