JBoss Community

Re: Remote txinflow: XID changes

created by Tom Jenkinson in JBoss Transactions Development - View the full discussion

Unfortunately I am sure after having several discussions with Jonathan about this (though happy to be disproved).

 

What we absolutely must be able to do is allow the recovery manager to detect orphan resources.

 

Typically we detect the orphan by looking in the gtrid for the node name (recall it is UID + node name). And that is OK now and moving forward for the none distributed case.

 

In the distributed case we are adding though, when the recovery manager is looking for orphaned resources registered against the *subordinate* it can't use the node name from the gtrid as that is the node name of the root TM rather than this subordinate.

 

Therefore I have put the node name of the subordinate in the bqual (which the subordinate transactions can edit).

 

Unfortunately a bqual can only be 64 bytes. In this 64 bytes we have to get:

1. The Uid (this could have been your path solution catted with a sequence number but I went with Uid to minimise change but they are the same for this discussion as they are only part of a bqual) - a Uid is 28 bytes constant

2. The "EIS name" - as I mentioned this is a requirement from customers - a variable length string

3. The subordinate node name (so crash recovery can detect orphan XA resources for the subordinate as described above)

4. The parent node name (this was added so the transport can choose to be implemented by a single proxy XA resource per local server that can recover for multiple remote servers and therefore needs to filter out the Xids it gets back from the call to XATerminator::recover by parent node name rather than Xid) *potentially this can be removed - the example I created https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples doesn't actually use this as I chose to create a new proxy per transaction, performance testing of the transport will indicate which is the more efficient*

 

So at a minimum we need to get (i.e. if we confirmed that the parent node name would not be of use):

1. The unique number for the branch

2. The EIS name

3. A node name

Into the 64 bytes of the bqual

Reply to this message by going to Community

Start a new discussion in JBoss Transactions Development at Community