Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-1370

Objects retrieved using getObject() in a transaction that rollsback are unusable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.4.1.SP1, 1.4.1.SP2, 1.4.1.SP3, 1.4.1.SP4, 1.4.1.SP5, 1.4.1.SP6, 1.4.1.SP7, 1.4.1.SP8, 1.4.1.SP9
    • Fix Version/s: 1.4.1.SP10
    • Component/s: Legacy POJO Cache
    • Labels:
      None

      Description

      POJO Cache 1.4.x adds interceptor changes during get operations to the undo list. This effectively prevents an object retrieved from a get() from being usable if a rollback occurs during the TX that contains the get.

      For this, and other reasons, get operations should never rollback interceptor additions.

      Original report:

      In my cluster i have 2 PojoCache (REPL_SYNC,inactive on startup,transcational,replication version 1.4.0.GA). First i create one cache and fill it with data, then i create the second cache and force full state transfer using region activation. On the second cache, after it received the state, in a new transaction, i fecth an object from the cache and modify a map it contains and then rollback the transaction. After the rollback, all the objects in the seconds cache are corrupted: all properties values are now null!, (the other cache is not corrupted). Note, when modifing a primitive property and then rollback, the cache is not corrupted. What i found is that in the corrupted objects, the instanceAdvisor appendedInterceptors list is missing the CacheInterceptor.

      attached a unit test demonstrating this bug. The test is based on the distribution org.jboss.cache.aop.statetransfer.StateTransferAopTestBase unit test, to run it, add it to the distribution org.jboss.cache.aop.statetransfer tests package and run the tests.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jason.greene Jason Greene
                Reporter:
                jason.greene Jason Greene
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: