Thread: BUG #5139: 2pc behaves differently on 8.3 and 8.4

BUG #5139: 2pc behaves differently on 8.3 and 8.4

From
"Thomas Kotzian"
Date:
The following bug has been logged online:

Bug reference:      5139
Logged by:          Thomas Kotzian
Email address:      thomas.kotzian@repromedia.at
PostgreSQL version: 8.4.1
Operating system:   Linux
Description:        2pc behaves differently on 8.3 and 8.4
Details:

i upgraded from 8.3 -> 8.4. we develop an application in java with jboss
4.2.3 and use the XA features. with 8.3 everything works, with 8.4 not.i
have tested the jdbc driver 8.3 and 8.4 (make no difference in any
combination). only downgrading to 8.3 works.

snapshot of the error messages:

20:37:17,535 WARN  [loggerI18N]
[com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed]
[com.arjuna.ats.internal.jta.resources.arjunacore.preparefailed]
XAResourceRecord.prepare - prepare failed with exception
XAException.XAER_RMERR
20:37:17,538 WARN  [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.BasicAction_50] - Prepare phase of
action 7f000101:abe6:4ae0a618:41 received heuristic decision:
TwoPhaseOutcome.HEURISTIC_HAZARD
20:37:17,538 WARN  [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.BasicAction_36] - BasicAction.End() -
prepare phase of action-id 7f000101:abe6:4ae0a618:41 failed.
20:37:17,538 WARN  [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.BasicAction_37] - Received heuristic:
TwoPhaseOutcome.HEURISTIC_HAZARD .
20:37:17,538 WARN  [arjLoggerI18N]
[com.arjuna.ats.arjuna.coordinator.BasicAction_38] - Action Aborting
20:37:17,586 ERROR [[haltestellen]] Servlet.service() for servlet
haltestellen threw exception
javax.transaction.HeuristicMixedException
   at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAn
dDisassociate(TransactionImple.java:1397)
   at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(Ba
seTransaction.java:135)
   at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactio
nManagerDelegate.java:87)
   at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClie
ntUserTransaction.java:140)
   at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransa
ctionManager.java:1028)
   at
org.springframework.transaction.support.AbstractPlatformTransactionManager.p
rocessCommit(AbstractPlatformTransactionManager.java:732)
   at
org.springframework.transaction.support.AbstractPlatformTransactionManager.c
ommit(AbstractPlatformTransactionManager.java:701)

what changes from 8.3 -> 8.4 could have caused this behaviour?

some issues are reported:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242404#4242404

http://www.jpox.org/servlet/forum/viewthread_thread,5816

http://www.nuxeo.org/discussions/message.jspa?messageID=8560

thank you!

Re: BUG #5139: 2pc behaves differently on 8.3 and 8.4

From
Heikki Linnakangas
Date:
Thomas Kotzian wrote:
> i upgraded from 8.3 -> 8.4. we develop an application in java with jboss
> 4.2.3 and use the XA features. with 8.3 everything works, with 8.4 not.i
> have tested the jdbc driver 8.3 and 8.4 (make no difference in any
> combination). only downgrading to 8.3 works.

Is there any error messages in the server log?

The only 2PC related change in 8.4 that I can recall is that we changed
the default max_prepared_transactions setting from 5 to 0. Perhaps you
forgot to set that? See
http://www.postgresql.org/docs/8.4/interactive/runtime-config-resource.html#GUC-MAX-PREPARED-TRANSACTIONS
for more information on that parameter.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com