Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8494

Clear is leaking transaction with Batching

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.2.2.Final
    • None
    • Transactions
    • None

    Description

      When batching is enabled, the clear() tries to suspend the running transaction but it ends leaking the internal transaction used in the batch.

        public void testClearInBatch() {
            Cache<String, String> cache = createCache("testClearInBatch");
            cache.put("k2", "value2");
      
            cache.startBatch();
            cache.clear();
            cache.put("k1", "value1");
            cache.endBatch(true);
      
            // the tx is leaked and it tries to execute the get() against a committed transaction.
            AssertJUnit.assertEquals(null, cache.get("k2"));
            AssertJUnit.assertEquals("value1", cache.get("k1"));
         }
      

      Attachments

        Activity

          People

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: