Cyrill commented on code in PR #5220:
URL: https://github.com/apache/ignite-3/pull/5220#discussion_r1954189924
##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/ItHighAvailablePartitionsRecoveryTest.java:
##########
@@ -397,4 +406,70 @@ void testScaleDownTimerIsWorkingForHaZone() throws
InterruptedException {
keyValueStorage
);
}
+
+ /**
+ * Test scenario.
+ * <ol>
+ * <li>Create a zone in HA mode with 7 nodes (A, B, C, D, E, F, G).</li>
+ * <li>Insert data and wait for replication to all nodes.</li>
+ * <li>Stop a majority of nodes (A, B, C, D).</li>
+ * <li>Wait for the partition to become available on the remaining nodes
(E, F, G).</li>
+ * <li>Start node A.</li>
+ * <li>Verify that node A cleans up its state.</li>
+ * </ol>
+ *
+ * @throws Exception If failed.
+ */
+ @Test
+ void testNodeStateCleanupAfterRestartInHaMode() throws Exception {
+ startNode(3);
+ startNode(4);
+ startNode(5);
+ startNode(6);
+
+ createHaZoneWithTable();
+
+ IgniteImpl node0 = igniteImpl(0);
+ Table table = node0.tables().table(HA_TABLE_NAME);
+
+ List<Throwable> errors = insertValues(table, 0);
+ assertThat(errors, is(empty()));
+ assertValuesPresentOnNodes(node0.clock().now(), table, 0, 1, 2, 3, 4,
5, 6);
+
+ alterZone(node0.catalogManager(), HA_ZONE_NAME, INFINITE_TIMER_VALUE,
null, null);
+
+ stopNodes(3, 4, 5, 6);
+
+ waitAndAssertStableAssignmentsOfPartitionEqualTo(node0, HA_TABLE_NAME,
PARTITION_IDS, nodeNames(0, 1, 2));
+
+ startNode(6);
+
+ assertValuesNotPresentOnNodes(node0.clock().now(), table, 6);
+ }
+
+ @Test
+ void test() throws Exception {
Review Comment:
On the second thought, do we even need it? Looks like it almost matches the
previous one
--
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]