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

Suspended optimistic transaction automatically resumes to last thread after a timeout.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.8
    • None

    Description

      This leads to unpredictable results from a user's point of view.

      Reproducer:

       

      public class IgniteTxSuspendAndTimeoutTest extends GridCommonAbstractTest {
          @Test
          public void testSuspendAndTimeout() throws Exception {
              Ignite ignite = startGrid(0);
      
              IgniteCache cache = ignite.createCache(new CacheConfiguration<>().setName("c").setAtomicityMode(TRANSACTIONAL));
      
              Transaction tx1 = ignite.transactions().txStart(OPTIMISTIC, TransactionIsolation.REPEATABLE_READ, 100, 0);
      
              cache.put(1, 1);
      
              tx1.suspend();
      
              assertNull(cache.get(1)); // Pass here.
      
              doSleep(200);
      
              assertNull(cache.get(1)); // Fail here. But we don't expect any explicitly running transaction at this point.
          }
      }
      

       

       

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m