[JBoss JIRA] Created: (JBTM-226) Possible race condition between top-down and bottom-up recovery
by Mark Little (JIRA)
Possible race condition between top-down and bottom-up recovery
---------------------------------------------------------------
Key: JBTM-226
URL: http://jira.jboss.com/jira/browse/JBTM-226
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JTA Implementation
Affects Versions: 4.2.3.SP4
Environment: Mac OS X, JDK 1.4.2.
Reporter: Mark Little
Assigned To: Mark Little
Priority: Critical
In local JTA recovery for non-serializable XAResources, the XAResourceRecovery implementation is needed to obtain a new XAResource. If a new resource isn't obtained (because the XAResourceRecovery instances haven't all been triggered yet), top-down recovery retries on subsequent recovery sweeps. Meanwhile, bottom up recovery can kick in and use an XAResource from a XAResourceRecovery that is now available and fail to locate any information on the transaction that will drive it top-down. Upon failing to find the transaction, it uses presumed abort and rolls back the instance, when in fact it should wait and commit it. But it doesn't do that until several phases have passed, and in which case most of the time top-down recovery will have re-run, found the XAResource and committed the transaction.
I'm fairly sure this is a race condition and does exist, but am still checking. Work around exists at the moment though.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 4 months
[JBoss JIRA] Created: (JBTM-329) When BridgeParticipantAT receives prepare, participant should associate current thread with corresponding JTA transaction
by Pavel Kadlec (JIRA)
When BridgeParticipantAT receives prepare, participant should associate current thread with corresponding JTA transaction
-------------------------------------------------------------------------------------------------------------------------
Key: JBTM-329
URL: http://jira.jboss.com/jira/browse/JBTM-329
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: JBoss-4.2.1.GA, JBossTS-4.2.3.SP7
Reporter: Pavel Kadlec
When participant receives prepare from coordinator, it calls prepare on jta transaction. SubordinateAtomicAction.doPrepare then calls beforeCompletion() method. Hibernate registers Synchronization object which is called in beforeCompletion() method. In that synchronization object, when hibernate cannot find transaction on current thread, it flushes all entites into database, which is bad.
When Hibernate cannot find transaction on thread, it logs WARN [AbstractEntityManagerImpl] Transaction not available on beforeCompletionPhase: assuming valid
Fix is easy, BridgeParticipantAT should associate current thread with the corresponding JTA transaction. And finally it should suspend that JTA transaction.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (JBTM-503) Shutdown the ExpiredEntryMonitor when stopping the RecoveryManager
by Mauro Molinari (JIRA)
Shutdown the ExpiredEntryMonitor when stopping the RecoveryManager
------------------------------------------------------------------
Key: JBTM-503
URL: https://jira.jboss.org/jira/browse/JBTM-503
Project: JBoss Transaction Manager
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Recovery
Affects Versions: 4.5
Environment: Tomcat + Spring + DBCP + JBossJTA
Reporter: Mauro Molinari
When the recovery manager is started, the implementation RecoveryManagerImple starts the ExpiredEntryMonitor.
When you stop the recovery manager, however, the ExpiredEntryMonitor is not shut down.
On line 250 of com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple there's the line ExpiredEntryMonitor.shutdown() commented out, with a "TODO why?" comment immediately before.
I don't know exactly what should be the lifecylce of ExpiredEntryMonitor versus that of RecoveryManagerImple, however I think that one of the following should happen:
- ExpiredEntryMonitor is started when RecoveryManagerImple is started (rather than constructed), so that it is shut down when the RecoveryManagerImple is stopped
OTHERWISE
- RecoveryManagerImple provides a way to "dispose" or "disable" it and this includes the shutdown of ExpiredEntryMonitor
OTHERWISE
- it is documented that stopping the recovery manager needs the ExpiredEntryMonitor to be stopped too: however, please consider that com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor.shutdown() throws a NullPointerException if called while the ExpiredEntryMonitor has not been started before and there is no public method to test if it has been started or not; so if I need to write some code that stops the ExpiredEntryMonitor (without knowing if it has been started or not) I have to write some ugly code like:
{code:java}
try
{
ExpiredEntryMonitor.shutdown();
}
catch(final NullPointerException e)
{
// ExpiredEntryMonitor had not been started
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months