Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

User Story #1158 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

Find optimal JTA implementation

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: OMERO-Beta4
Component: ORM Keywords: jta, orm, database, transactions
Cc: Story Points: n.a.
Sprint: n.a. Importance: n.a.
Total Remaining Time: n.a. Estimated Remaining Time: n.a.

Description (last modified by jmoore)

While using c3p0 in blitz, it was found that large sections of code were unprotected by transactions. Since then, we've been testing various JTA providers to improve the situation.

JOTM

Under high-load could become completely dead-locked.

atomikos

After 2-3 weeks of uptime, the server fails with "heurtistic" exceptions.

Bitronix (btm)

With 2PC, hangs on one of the first server calls; with 1PC throws "can only enlist one Lru source"

JBossTS / Arjuna

Without conncetion reconnect, consumes all Postgres connections; with, throws heuristic exceptions.


Apparently our use of transactions is not compatible with any JTA implementation (or the spec??) and so some re-architecting is necessary.

Change History (6)

comment:1 Changed 12 years ago by jmoore

  • Description modified (diff)

comment:2 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

[http://jdbc.postgresql.org/development/privateapi/org/postgresql/xa/PGXAConnection.html PGXAConnection:

The PostgreSQL implementation of XAResource. This implementation doesn't support transaction interleaving (see JTA specification, section 3.4.4) and suspend/resume. Two-phase commit requires PostgreSQL server version 8.1 or higher.

Our use of transactions was apparently too much for PGXAConnection, so that any JTA implementation could not work properly. This showed itself in various weird ways (as outlined above). Until Postgres full supports JTA/XA, we will have to use single-database logic.

Closing with r3425, 3424, r3420, r3417-r3415, ...

comment:3 Changed 12 years ago by omero

I'm curious about how you came up to the conclusion that you asked too much for PGXA and also what made BTM hang.

If you're interested in revisiting this issue I welcome you to ask for help on the BTM mailing list: http://www.nabble.com/Bitronix-Transaction-Manager-f25701.html

Cheers,
Ludovic Orban

comment:4 Changed 12 years ago by jmoore

When it's time to re-evaluate implementations, visit the thread:

http://www.nabble.com/Slightly-more-info-on-%22BTM-hangs-with-PGXAConnection%22-(OMERO--1158)-tt22028143.html#a22028143

for help with BTM.

comment:5 Changed 12 years ago by jmoore

Note: was using atomikos non-xa data source however it returned ThreadLocal connections which is entirely confusing. Now testing with btm's non-xa data source.

comment:6 Changed 12 years ago by jmoore

See also commits around r3767 as atomikos was switched out for btm.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.193124 sec.)

We're Hiring!