[jboss-dev-forums] [JBoss Transactions Development] - Re: Remote txinflow: XID changes
David Lloyd
do-not-reply at jboss.com
Fri Oct 7 10:14:46 EDT 2011
David Lloyd [http://community.jboss.org/people/dmlloyd] created the discussion
"Re: Remote txinflow: XID changes"
To view the discussion, visit: http://community.jboss.org/message/630611#630611
--------------------------------------------------------------
>
> Tom Jenkinson wrote:
>
> Only the root TM would be in the gtrid, we can't edit that as the transaction flows.
>
But for recovery we only need the root TM right? That would eliminate the risk of a subordinate TM recovering a branch of a transaction because it would recognize that it wasn't the root?
> Tom Jenkinson wrote:
>
> Again, each RM will need to put its own name in the XID so again we can't cat this into the gtrid.
Okay, so the gtid gets the root TM's name and the bqual gets the RM name (assuming such things have names)?
> Tom Jenkinson wrote:
>
> Ah, understood. I was thinking the first few bits were binary, hence 100 could have been either read as 1 (for 1 trailing nybble) or 100 (for 4). Now I get you, the prefix is the number of nybbles, like in roman numerals.
>
> If it is 0 terminated as you show above though, it looks like 1111 10xx xxxx xxxx xxxx xxxx should really be 1111 10xx xxxx xxxx xxxx xxxx xxxx (five trailing nybbles AFTER the nybble where the counter prefix finishes? Or should it be read as the number of "total number of nybbles (less one) that the number is read from". E.g in your last case the number has been encoded in 5 plus 1 nybbles.
Well, I meant 5 nybbles holding data however after reviewing I guess that's not really correct. It would be more correct to say "the number of nybbles in the total encoded number = the leading number of 1s plus 1". With 0000 being a special case.
> Tom Jenkinson wrote:
>
> Anyway, for the purposes of the discussion I get what you are proposing, I guess the question would be when it comes to recovery, when the node recovers how does it know which XIDs it should be looking for? With my proposal where the node is configured with a node ID via the CoreEnvironmentBean it can look in the XID for a match, in your scenario how would it know?
Assuming that transactions should only be recovered by the root node which originated it, we would just use gtid to identify the "ownership" of the transaction. Otherwise, all the known unrecovered XIDs from the node itself plus its subordinates should be propagated back upon recovery request. I'd also need some kind of loop detection at the protocol level though.
We could potentially optimize this process by using our knowledge of the XID format to filter the XID list by owner name before sending it back to the requestor.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/630611#630611]
Start a new discussion in JBoss Transactions Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2041]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111007/f930c667/attachment.html
More information about the jboss-dev-forums
mailing list