Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-8522

Transaction incorrect state after cache closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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.
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Alexey Kuznetsov Alexey Kuznetsov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: