ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-8522) Transaction incorrect state after cache closed
Date Thu, 17 May 2018 15:18:00 GMT
Alexey Kuznetsov created IGNITE-8522:

             Summary: Transaction incorrect state after cache closed
                 Key: IGNITE-8522
                 URL: https://issues.apache.org/jira/browse/IGNITE-8522
             Project: Ignite
          Issue Type: Bug
            Reporter: Alexey Kuznetsov
            Assignee: Alexey Kuznetsov

When we started transaction on client node and closed cache , transaction is rolled back.
But tx state is still ACTIVE which causes unexpected exception when we try to commit it.
The expected exception is TransactionRollbackException.

Look at the following code:

public void testTxRollbackWhenCacheClosed() throws Exception {
        startGrid(0);// server node started

        client = true;

        IgniteEx clientNode = startGrid(1);

        IgniteCache cache = clientNode.createCache();// transactional cache is started

        IgniteTransactions transactions = clientNode.transactions();

        Transaction tx = transactions.txStart();

        cache.put(1, 1);

        multithreaded(cache::close, 1);

        tx.commit();// TransactionRollbackException expected, but NPE is thrown.

This message was sent by Atlassian JIRA

View raw message