[
https://issues.apache.org/jira/browse/IGNITE-23680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Chudov updated IGNITE-23680:
----------------------------------
Description:
*Motivation*
In order to implement the SQL command
{code:sql}
KILL TRANSACTION txId
{code}
we need to add a new method to TxManager/improvement of TxManager#finish that
will be able to rollback any read-only and read-write transaction by tx ID.
It also should return the boolean result: true if the tx existed and was
aborted by this command, false otherwise.
For example
{code:java}
// returns false in case transaction not exists / already completed (or
aborted)
CompletableFuture<Boolean> finish(UUID txId);
{code}
*Definition of done*
There is a method
{noformat}
boolean TxManager#finish(txId){noformat}
which accepts only tx id to abort the transaction on coordinator. We also
should add a link to RW txns instances into volatile tx states, and a link to
RO txns to low watermark locks (or RO tx inflights). The mentioned method
should be able to get tx instance by id and call finish(commit = false) on it.
Cluster-wide txn finish by id should be done under separate ticket.
was:
In order to implement the SQL command
{code:sql}
KILL TRANSACTION txId
{code}
we need to add a new method to TxManager/improvement of TxManager#finish that
will be able to rollback any read-only and read-write transaction by tx ID.
It also should return the boolean result: true if the tx existed and was
aborted by this command, false otherwise.
For example
{code:java}
// returns false in case transaction not exists / already completed (or
aborted)
CompletableFuture<Boolean> cancelLocalAsync(UUID txId);
{code}
*NOTE:* It is assumed that the method will be called on all cluster nodes (via
a broadcast message) in some cases, when location of tx coordinator or commit
partition is unknown on a node when KILL command is called.
> Add the ability to rollback any transaction by ID
> -------------------------------------------------
>
> Key: IGNITE-23680
> URL: https://issues.apache.org/jira/browse/IGNITE-23680
> Project: Ignite
> Issue Type: Improvement
> Reporter: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3, transactions
>
> *Motivation*
> In order to implement the SQL command
> {code:sql}
> KILL TRANSACTION txId
> {code}
> we need to add a new method to TxManager/improvement of TxManager#finish that
> will be able to rollback any read-only and read-write transaction by tx ID.
> It also should return the boolean result: true if the tx existed and was
> aborted by this command, false otherwise.
> For example
> {code:java}
> // returns false in case transaction not exists / already completed (or
> aborted)
> CompletableFuture<Boolean> finish(UUID txId);
> {code}
> *Definition of done*
> There is a method
> {noformat}
> boolean TxManager#finish(txId){noformat}
> which accepts only tx id to abort the transaction on coordinator. We also
> should add a link to RW txns instances into volatile tx states, and a link to
> RO txns to low watermark locks (or RO tx inflights). The mentioned method
> should be able to get tx instance by id and call finish(commit = false) on
> it.
> Cluster-wide txn finish by id should be done under separate ticket.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)