Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-1354

JCA recovery race condition

    XMLWordPrintable

Details

    Description

      Evidenced in SimpleIsolatedServers::testSimultaneousRecovery

      Basically XATerminatorImple -> SAA::activate() -> XAResourceRecord::restore_state() -> getNewXAResource() -> XARecoveryModule::getNewXAResource()

      At this point _xidScans may be none-null but still only partial from the first scan: periodicWorkSecondPass -> bottomUpRecovery -> resourceInitiatedRecoveryForRecoveryHelpers -> xaRecovery

      if (_xidScans == null)
      _xidScans = new Hashtable<XAResource,RecoveryXids>();

      What I am not sure of is whether we should synchronize bottomUpRecovery and getNewXAResource as that would stop this race condition. Gonna give that a whirl.

      Attachments

        Issue Links

          Activity

            People

              thjenkin@redhat.com Tom Jenkinson
              thjenkin@redhat.com Tom Jenkinson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: