Igor created IGNITE-20731:
-----------------------------
Summary: Exception "The primary replica has changed" on big amount
of rows
Key: IGNITE-20731
URL: https://issues.apache.org/jira/browse/IGNITE-20731
Project: Ignite
Issue Type: Bug
Components: persistence
Affects Versions: 3.0.0-beta2
Reporter: Igor
*Steps to reproduce:*
1. Start cluster with 1 node with JVM options: "-Xms4096m -Xmx4096m"
2. Execute
{code:java}
create table rows_capacity_table(id INTEGER not null, column_1 VARCHAR(50) not
null, column_2 VARCHAR(50) not null, column_3 VARCHAR(50) not null, column_4
VARCHAR(50) not null, primary key (id)) {code}
3. Insert rows into table up to 1 000 000 rows.
*Expected result:*
Rows are inserted.
*Actual result:*
After 733000 rows the exception is thrown.
Client:
{code:java}
java.sql.BatchUpdateException:
org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
IGN-REP-6 TraceId:9b8ef95a-bbbe-48cf-9c94-2e80d01c2033 The primary replica has
changed [expectedLeaseholder=TablesAmountCapacityTest_cluster_0,
currentLeaseholder=null]
at
org.apache.ignite.internal.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:155)
{code}
Server:
{code:java}
2023-10-23 13:47:31:529 +0300
[INFO][%TablesAmountCapacityTest_cluster_0%metastorage-watch-executor-0][PartitionReplicaListener]
Primary replica expired [grp=5_part_12]
2023-10-23 13:47:31:532 +0300
[INFO][%TablesAmountCapacityTest_cluster_0%metastorage-watch-executor-0][PartitionReplicaListener]
Primary replica expired [grp=5_part_20]
2023-10-23 13:47:31:536 +0300
[INFO][%TablesAmountCapacityTest_cluster_0%metastorage-watch-executor-0][PartitionReplicaListener]
Primary replica expired [grp=5_part_24]
2023-10-23 13:47:31:539 +0300
[INFO][%TablesAmountCapacityTest_cluster_0%metastorage-watch-executor-0][PartitionReplicaListener]
Primary replica expired [grp=5_part_16]
2023-10-23 13:47:31:699 +0300
[WARNING][%TablesAmountCapacityTest_cluster_0%metastorage-watch-executor-3][ReplicaManager]
Failed to process replica request [request=TxFinishReplicaRequestImpl
[commit=false, commitTimestampLong=111283931920007204, groupId=5_part_24,
groups=HashSet [5_part_5, 5_part_4, 5_part_7, 5_part_6, 5_part_1, 5_part_0,
5_part_3, 5_part_2, 5_part_13, 5_part_12, 5_part_15, 5_part_14, 5_part_9,
5_part_8, 5_part_11, 5_part_10, 5_part_21, 5_part_20, 5_part_23, 5_part_22,
5_part_17, 5_part_16, 5_part_19, 5_part_18, 5_part_24],
term=111283839559532593, timestampLong=111283932466315264,
txId=018b5c25-7653-0000-0000-000023c06ab5]]
java.util.concurrent.CompletionException:
org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
IGN-REP-6 TraceId:9b8ef95a-bbbe-48cf-9c94-2e80d01c2033 The primary replica has
changed [expectedLeaseholder=TablesAmountCapacityTest_cluster_0,
currentLeaseholder=null]
at
java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367)
at
java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376)
at
java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1074)
at
java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at
org.apache.ignite.internal.util.PendingComparableValuesTracker.lambda$completeWaitersOnUpdate$0(PendingComparableValuesTracker.java:169)
at
java.base/java.util.concurrent.ConcurrentMap.forEach(ConcurrentMap.java:122)
at
org.apache.ignite.internal.util.PendingComparableValuesTracker.completeWaitersOnUpdate(PendingComparableValuesTracker.java:169)
at
org.apache.ignite.internal.util.PendingComparableValuesTracker.update(PendingComparableValuesTracker.java:103)
at
org.apache.ignite.internal.metastorage.server.time.ClusterTimeImpl.updateSafeTime(ClusterTimeImpl.java:146)
at
org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl.onSafeTimeAdvanced(MetaStorageManagerImpl.java:849)
at
org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl$1.onSafeTimeAdvanced(MetaStorageManagerImpl.java:456)
at
org.apache.ignite.internal.metastorage.server.WatchProcessor.lambda$advanceSafeTime$7(WatchProcessor.java:281)
at
java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
at
java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by:
org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
IGN-REP-6 TraceId:9b8ef95a-bbbe-48cf-9c94-2e80d01c2033 The primary replica has
changed [expectedLeaseholder=TablesAmountCapacityTest_cluster_0,
currentLeaseholder=null]
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$ensureReplicaIsPrimary$191(PartitionReplicaListener.java:2950)
at
java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
... 15 more {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)