ibessonov commented on code in PR #7644:
URL: https://github.com/apache/ignite-3/pull/7644#discussion_r2846232542
##########
modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexTest.java:
##########
@@ -116,6 +119,46 @@ void testBuildIndexOnStableTopology(int replicas) throws
Exception {
.check();
}
+ @Test
+ void testRaftCommandsDuplicationOnPrimaryNotCollocatedWithLeader() throws
Exception {
+ int replicas = 2;
+ int partitions = 1;
+
+ LogInspector logInspector = new LogInspector(
+ BuildIndexCommandHandler.class.getName(),
+ evt ->
evt.getMessage().getFormattedMessage().contains("Duplicated building the index
command received")
+ );
+
+ logInspector.start();
+ try {
+ createAndPopulateTable(replicas, partitions);
+
+ ZonePartitionId tableGroupId = replicationGroupId(TABLE_NAME, 0);
+
+ IgniteImpl currentPrimary = primaryReplica(tableGroupId);
+
+ changeLeader(tableGroupId, currentPrimary);
+
+ createIndex(INDEX_NAME);
+
+ checkIndexBuild(partitions, replicas, INDEX_NAME);
+
+ assertFalse(logInspector.isMatched());
+ } finally {
+ logInspector.stop();
+ }
+ }
+
+ private static void changeLeader(ZonePartitionId groupId, IgniteImpl
currentPrimary) throws Exception {
Review Comment:
Sure, why not
--
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]