You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2024/03/19 10:24:00 UTC

[jira] [Created] (IGNITE-21799) A transaction rollback fails with assertion error

Andrey Mashenkov created IGNITE-21799:
-----------------------------------------

             Summary: A transaction rollback fails with assertion error
                 Key: IGNITE-21799
                 URL: https://issues.apache.org/jira/browse/IGNITE-21799
             Project: Ignite
          Issue Type: Bug
            Reporter: Andrey Mashenkov


A transaction rollback fails with 
{noformat}
java.lang.AssertionError: Thread does not have allowed operations
{noformat}

Here is a simple reproducer.
{code:java}
 @Test
    public void rollbackAsync() {
        Ignite node = CLUSTER.aliveNode();

        sql("CREATE TABLE IF NOT EXISTS TEST(ID INT PRIMARY KEY, VAL0 INT)");

        KeyValueView<Tuple, Tuple> view1 = node.tables().table("TEST").keyValueView();

        AtomicReference<CompletableFuture<Void>> rollbackFut = new AtomicReference<>();
        
        Transaction tx = node.transactions().begin();
        view1.getAsync(tx, makeKey(101))
             .handle((unused, err) -> {
                    rollbackFut.set(tx.rollbackAsync()); // unconditional roll back

                    return null;
            }).join(); 

            rollbackFut.get().join(); // <- FAILS
        }
    }
{code}




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