[
https://issues.apache.org/jira/browse/IGNITE-23213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Chudov updated IGNITE-23213:
----------------------------------
Description:
h3. Motivation
Placement-driven creates an agreement to start negotiation about the primary
replica lease. Then a lease is created after a replica sends an acknowledgement
of this agreement.
We propose this process in lenirialized through the MS. But agreements do not
store in MS and might be updated in a local lease update process that we apply
a lease which is not math to current agreement.
Scenario:
* 1st iteration of lease updater: empty lease created, lease agreement
created, negotiation started;
* lease tracker doesn't update local leases because of some delay;
* 2nd itertaion of lease updater: empty lease is created again, new lease
agreement created, but negotiation is not started because ms.invoke fails;
* lease negotiation finished: in fact the 1st lease was negotiated but
agreement was overridden and 2nd lease is published.
{noformat}
Caused by:
org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
IGN-REP-6 TraceId:2f960fa5-b393-40f4-8066-9f9f4b539f07 The primary replica has
changed [txId=0191ea41-2f04-0004-2a17-e67f00000001,
expectedEnlistmentConsistencyToken=113129031393542406,
currentEnlistmentConsistencyToken=113129031360315925].
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$applyUpdateAllCommand$124(PartitionReplicaListener.java:2891)
at
java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
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.table.distributed.replicator.PartitionReplicaListener.lambda$applyCmdWithRetryOnSafeTimeReorderException$117(PartitionReplicaListener.java:2683)
at
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at
java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at
java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
at
java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
... 3 more
{noformat}
h3. Definition of done
Lease should match the agreement, which was sent to a remote replica.
Tests for corner cases added.
was:
h3. Motivation
Placement-driven creates an agreement to start negotiation about the primary
replica lease. Then a lease is created after a replica sends an acknowledgement
of this agreement.
We propose this process in lenirialized through the MS. But agreements do not
store in MS and might be updated in a local lease update process that we apply
a lease which is not math to current agreement:
{noformat}
Caused by:
org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
IGN-REP-6 TraceId:2f960fa5-b393-40f4-8066-9f9f4b539f07 The primary replica has
changed [txId=0191ea41-2f04-0004-2a17-e67f00000001,
expectedEnlistmentConsistencyToken=113129031393542406,
currentEnlistmentConsistencyToken=113129031360315925].
at
org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$applyUpdateAllCommand$124(PartitionReplicaListener.java:2891)
at
java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
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.table.distributed.replicator.PartitionReplicaListener.lambda$applyCmdWithRetryOnSafeTimeReorderException$117(PartitionReplicaListener.java:2683)
at
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at
java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at
java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
at
java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
... 3 more
{noformat}
h3. Definition of done
Lease should match the agreement, which was sent to a remote replica.
> Lease agreement can be overridden, but MS not updated
> -----------------------------------------------------
>
> Key: IGNITE-23213
> URL: https://issues.apache.org/jira/browse/IGNITE-23213
> Project: Ignite
> Issue Type: Bug
> Reporter: Vladislav Pyatkov
> Priority: Major
> Labels: ignite-3
>
> h3. Motivation
> Placement-driven creates an agreement to start negotiation about the primary
> replica lease. Then a lease is created after a replica sends an
> acknowledgement of this agreement.
> We propose this process in lenirialized through the MS. But agreements do not
> store in MS and might be updated in a local lease update process that we
> apply a lease which is not math to current agreement.
> Scenario:
> * 1st iteration of lease updater: empty lease created, lease agreement
> created, negotiation started;
> * lease tracker doesn't update local leases because of some delay;
> * 2nd itertaion of lease updater: empty lease is created again, new lease
> agreement created, but negotiation is not started because ms.invoke fails;
> * lease negotiation finished: in fact the 1st lease was negotiated but
> agreement was overridden and 2nd lease is published.
> {noformat}
> Caused by:
> org.apache.ignite.internal.replicator.exception.PrimaryReplicaMissException:
> IGN-REP-6 TraceId:2f960fa5-b393-40f4-8066-9f9f4b539f07 The primary replica
> has changed [txId=0191ea41-2f04-0004-2a17-e67f00000001,
> expectedEnlistmentConsistencyToken=113129031393542406,
> currentEnlistmentConsistencyToken=113129031360315925].
> at
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$applyUpdateAllCommand$124(PartitionReplicaListener.java:2891)
> at
> java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
> 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.table.distributed.replicator.PartitionReplicaListener.lambda$applyCmdWithRetryOnSafeTimeReorderException$117(PartitionReplicaListener.java:2683)
> at
> java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
> at
> java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
> at
> java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
> at
> java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
> at
> java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
> at
> java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
> ... 3 more
> {noformat}
> h3. Definition of done
> Lease should match the agreement, which was sent to a remote replica.
> Tests for corner cases added.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)