You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Mirza Aliev (Jira)" <ji...@apache.org> on 2024/05/30 15:20:00 UTC

[jira] [Assigned] (IGNITE-22207) Handling of AwaitPrimaryReplica request maight lead to the dedalock

     [ https://issues.apache.org/jira/browse/IGNITE-22207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mirza Aliev reassigned IGNITE-22207:
------------------------------------

    Assignee: Mirza Aliev

> Handling of AwaitPrimaryReplica request maight lead to the dedalock
> -------------------------------------------------------------------
>
>                 Key: IGNITE-22207
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22207
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Assignee: Mirza Aliev
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> We handle ReplicaUnavailableException in ReplicaService to handle request transparency even if the replica had not been read at the time the request was sent. To do this, we send AwaitReplicaRequest as a handling of the exception and then process the origin request when the replica is guaranteed ready.
> In the event that the AwaitReplicaRequest is handled locally, we will do it synchronously in pendingInvokes.computeIfAbsent:
> {code}
> CompletableFuture<NetworkMessage> awaitReplicaFut = pendingInvokes.computeIfAbsent(
>         targetNodeConsistentId,
>         consistentId -> {
>             AwaitReplicaRequest awaitReplicaReq = REPLICA_MESSAGES_FACTORY.awaitReplicaRequest()
>                     .groupId(req.groupId())
>                     .build();
>             return messagingService.invoke(
>                     targetNodeConsistentId,
>                     awaitReplicaReq,
>                     replicationConfiguration.rpcTimeout().value()
>             );
>         }
> );
> {code}
> and then hands on handling of AwaitReplicaRequest, due to removing from pendingInvokes:
> {code}
> awaitReplicaFut.handle((response0, throwable0) -> {
>     pendingInvokes.remove(targetNodeConsistentId, awaitReplicaFut);
> ...
> {code}
> h3. Definition of doe
> Take out of the network invokation from the map compute closure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)