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

JCA recovery race condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.17.4, 5.0.0.M2
    • None
    • JCA, JTA, Recovery
    • None

      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.

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

              Created:
              Updated:
              Resolved: