[
https://issues.apache.org/jira/browse/IGNITE-23695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Chudov updated IGNITE-23695:
----------------------------------
Description:
*Motivation*
This is the further improvement for KILL tx command.
Under IGNITE-23680 we should add ability to abort tx on coordinator. But KILL
command, in common case, should be able to abort any txn cluster-wide, if it is
possible, having only tx id.
*Definition of done*
The method
{code:java}
CompletableFuture<Boolean> TxManager#finish(txId){code}
added under IGNITE-23680, should work as follows:
* if called on tx coordinator, perform tx finish as it is described and should
be already done in IGNITE-23680;
* if called not on coordinator, should try to get tx state and get the
coordinator id. If tx state is found, then it should send new
TxRecoveryCoordinatorMessage (which should be implemented) to finish the tx on
coordinator, invalidating its local tx instance as well
* If there is no coordinator in the cluster then it tries to find the commit
partition and its primary replica location and then send the TxRecoveryMessage
there;
* If commit partition is not available (majority is offline) it means that
it's not possible to kill the txn right now; the action should throw exception,
* If the location of either coordination (or commit partition, if needed) is
unknown, then the new FindTransactionState message should be broadcasted over
cluster in order to get FindTransactionStateResponse from any node, where the
tx state is contained, with information about txn coordinator and commit
partition id. After that, we can proceed as described above.
Note: the described algorithm assumes that the handlers of TxRecoveryMessage
and TxRecoveryCoordinatorMessage should respond with operation result (whether
txn was found and aborted).
was:
*Motivation*
This is the further improvement for KILL tx command.
Under IGNITE-23680 we should add ability to abort tx on coordinator. But KILL
command, in common case, should be able to abort any txn cluster-wide, if it
possible, having only tx id.
*Definition of done*
The method
{code:java}
CompletableFuture<Boolean> TxManager#finish(txId){code}
added under IGNITE-23680, should work as follows:
* if called on tx coordinator, perform tx finish as it is described and should
be already done in IGNITE-23680;
* if called not on coordinator, should try to get tx state and get the
coordinator id. If tx state is found, then it should send new
TxRecoveryCoordinatorMessage (which should be implemented) to finish the tx on
coordinator, invalidating its local tx instance as well
* If there is no coordinator in the cluster then it tries to find the commit
partition and its primary replica location and then send the TxRecoveryMessage
there;
* If commit partition is not available (majority is offline) it means that
it's not possible to kill the txn right now; the action should throw exception,
* If the location of either coordination (or commit partition, if needed) is
unknown, then the new FindTransactionState message should be broadcasted over
cluster in order to get FindTransactionStateResponse from any node, where the
tx state is contained, with information about txn coordinator and commit
partition id. After that, we can proceed as described above.
Note: the described algorithm assumes that the handlers of TxRecoveryMessage
and TxRecoveryCoordinatorMessage should respond with operation result (whether
txn was found and aborted).
> Add the ability to rollback any transaction by ID cluster-wide
> --------------------------------------------------------------
>
> Key: IGNITE-23695
> URL: https://issues.apache.org/jira/browse/IGNITE-23695
> Project: Ignite
> Issue Type: New Feature
> Reporter: Denis Chudov
> Priority: Major
> Labels: ignite-3
>
> *Motivation*
> This is the further improvement for KILL tx command.
> Under IGNITE-23680 we should add ability to abort tx on coordinator. But KILL
> command, in common case, should be able to abort any txn cluster-wide, if it
> is possible, having only tx id.
> *Definition of done*
> The method
>
> {code:java}
> CompletableFuture<Boolean> TxManager#finish(txId){code}
>
> added under IGNITE-23680, should work as follows:
> * if called on tx coordinator, perform tx finish as it is described and
> should be already done in IGNITE-23680;
> * if called not on coordinator, should try to get tx state and get the
> coordinator id. If tx state is found, then it should send new
> TxRecoveryCoordinatorMessage (which should be implemented) to finish the tx
> on coordinator, invalidating its local tx instance as well
> * If there is no coordinator in the cluster then it tries to find the commit
> partition and its primary replica location and then send the
> TxRecoveryMessage there;
> * If commit partition is not available (majority is offline) it means that
> it's not possible to kill the txn right now; the action should throw
> exception,
> * If the location of either coordination (or commit partition, if needed) is
> unknown, then the new FindTransactionState message should be broadcasted over
> cluster in order to get FindTransactionStateResponse from any node, where the
> tx state is contained, with information about txn coordinator and commit
> partition id. After that, we can proceed as described above.
> Note: the described algorithm assumes that the handlers of TxRecoveryMessage
> and TxRecoveryCoordinatorMessage should respond with operation result
> (whether txn was found and aborted).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)