JBoss Community

Re: remote tx inflow: timeouts

created by David Lloyd in JBoss Transactions Development - View the full discussion

Tom Jenkinson wrote:

 

I don't think I am explaining this well enough.

 

Say there is a root TM and a subordinate TM with a timeout of say 2 second

 

time T+0: root TM starts transaction timeout of 2

time T+1:  tx flows to subordinate TM (using the remaining amount of timeout at root TM as the timeout for subordinate TM, i.e. the timeout value appears to be 1 at the subordinate TM)

time T+2: subordinate TM timesout and forgets about the transaciton AND root TM timesout. The root TM timeout cascades the abort to all XAResources (remember in the model we are going for subordinate transaction managers are registered as XAResources so each subordinate gets a call to abort from the root tm)

time T+3: the subordinate transaction manager receives the abort message from the root TM via the proxy XAResource but by now has cleaned up the transaction so will return an error indicating that it can't find the transaction

Yeah I get the potential issue.  The extra time added has to be greater than the expected latency between the time the root controller issues the timeout notice and the time that the subordinate can receive and process it.

 

That said, we need some level of tolerance for the case where the given extra time is not sufficient and the subordinate node is unable to abort the transaction because it's already gone, because it will happen at some point.  Ideally, this transaction abort would be idempotent.

Reply to this message by going to Community

Start a new discussion in JBoss Transactions Development at Community