ascherbakoff commented on code in PR #5124:
URL: https://github.com/apache/ignite-3/pull/5124#discussion_r1935374119
##########
modules/table/src/integrationTest/java/org/apache/ignite/distributed/ReplicasSafeTimePropagationTest.java:
##########
@@ -254,6 +274,45 @@ public void testSafeTimeReorderingOnClusterShrink() throws
Exception {
assertTrue(leaderNode2.safeTs.current().compareTo(firstSafeTs) > 0);
}
+ @Test
+ public void testSafeTimeReorderingOnRetry() throws Exception {
+ {
+ cluster = Stream.of("node1").collect(toMap(identity(),
PartialNode::new));
+
+ startCluster(cluster);
+ }
+
+ PartialNode someNode = cluster.values().iterator().next();
+
+ RaftGroupService raftClient = someNode.raftClient;
+
+ assertThat(raftClient.refreshLeader(), willCompleteSuccessfully());
+
+ // Assumes stable clock on test runner.
+ HybridClock initiatorClock = new TestHybridClock(() ->
System.currentTimeMillis() - 100);
+
+ sendSafeTimeSyncCommand(raftClient, initiatorClock.now());
+
+ blockFsmThread = true;
+
+ var fut = sendSafeTimeSyncCommandAsync(raftClient,
initiatorClock.now());
+ var fut2 = sendSafeTimeSyncCommandAsync(raftClient,
initiatorClock.now());
+
+ l1.await();
+
+ // Block enough to trigger retry.
+ Thread.sleep(raftConfiguration.responseTimeout().value() + 1000);
+
+ LOG.info("Unblocking FSM thread");
+
+ blockFsmThread = false;
+
+ l2.countDown();
+
+ fut.join();
+ fut2.join();
Review Comment:
🆗
--
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]