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

Atomic cache remove operations are not logged into WAL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 2.3
    • persistence
    • None
    • Important

    Description

      Create cache with atomicity mode CacheAtomicityMode ATOMIC
      and perform put remove for one cache entry

       for (int i = 0; i < 10; i++) {
      
                      cache.put(i, new Organization(i, "Organization-" + i));
      
                      if (i % 2 == 0)
                          cache.put(i, new Organization(i, "Organization-updated-" + i));
      
                      if (i % 5 == 0)
                          cache.remove(i);
                  }
      

      Actual WAL content loaded by standalone WAL iterator is as follows:

      [2017-10-03 20:13:38,920][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 0; Value: Organization{key=0, name='Organization-0'}
      [2017-10-03 20:13:38,920][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 0; Value: Organization{key=0, name='Organization-updated-0'}
      [2017-10-03 20:13:38,920][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 1; Value: Organization{key=1, name='Organization-1'}
      [2017-10-03 20:13:38,920][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 2; Value: Organization{key=2, name='Organization-2'}
      [2017-10-03 20:13:38,920][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 2; Value: Organization{key=2, name='Organization-updated-2'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 3; Value: Organization{key=3, name='Organization-3'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 4; Value: Organization{key=4, name='Organization-4'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 4; Value: Organization{key=4, name='Organization-updated-4'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 5; Value: Organization{key=5, name='Organization-5'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 6; Value: Organization{key=6, name='Organization-6'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 6; Value: Organization{key=6, name='Organization-updated-6'}
      [2017-10-03 20:13:38,921][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 7; Value: Organization{key=7, name='Organization-7'}
      [2017-10-03 20:13:38,922][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 8; Value: Organization{key=8, name='Organization-8'}
      [2017-10-03 20:13:38,922][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 8; Value: Organization{key=8, name='Organization-updated-8'}
      [2017-10-03 20:13:38,922][INFO ][test-runner-#1%reader.IgniteWalReaderTest%][root] //Entry operation UPDATE; cache Id76454884; under transaction: null; Key: 9; Value: Organization{key=9, name='Organization-9'}
      
      

      For TRANSACTIONAL AtomicityMode same test is passing.

      Reproducing test can be found in IgniteWalReaderTest.java in PR 2797 (IGNITE-6553):
      https://github.com/apache/ignite/pull/2797/files#diff-0f9e5c632b02b68d2e958ddc217d48a1

      testRemoveOperationPresentedForDataEntryForAtomic fails, but testRemoveOperationPresentedForDataEntry is passing

      Attachments

        Activity

          People

            agoncharuk Alexey Goncharuk
            dpavlov Dmitry Pavlov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: