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

Alexander Lapin updated IGNITE-20148:
-------------------------------------
    Description: 
h3. Motivation

Currently, locks are released on primary when cleanup is replicated over 
majority
{code:java}
private CompletableFuture<Void> processTxCleanupAction(TxCleanupReplicaRequest 
request) {
    ...
        return raftClient
                .run(txCleanupCmd)
                .thenCompose(ignored -> 
allOffFuturesExceptionIgnored(txReadFutures, request)
                        .thenRun(() -> releaseTxLocks(request.txId())));
    ...
} {code}
That is actually incorrect, because it's possible that primary won't be a part 
of majority, meaning that we will release lock still having writeIntent 
locally. Generally speaking that should be resovled by implementing writeIntent 
resolution for RW transactions

> Explicit writeIntent cleanup on primary replica
> -----------------------------------------------
>
>                 Key: IGNITE-20148
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20148
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Motivation
> Currently, locks are released on primary when cleanup is replicated over 
> majority
> {code:java}
> private CompletableFuture<Void> 
> processTxCleanupAction(TxCleanupReplicaRequest request) {
>     ...
>         return raftClient
>                 .run(txCleanupCmd)
>                 .thenCompose(ignored -> 
> allOffFuturesExceptionIgnored(txReadFutures, request)
>                         .thenRun(() -> releaseTxLocks(request.txId())));
>     ...
> } {code}
> That is actually incorrect, because it's possible that primary won't be a 
> part of majority, meaning that we will release lock still having writeIntent 
> locally. Generally speaking that should be resovled by implementing 
> writeIntent resolution for RW transactions



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

Reply via email to