[jboss-dev-forums] [JBoss Transactions Development] - Re: Remote txinflow: XID changes
Tom Jenkinson
do-not-reply at jboss.com
Thu Oct 20 06:29:54 EDT 2011
Tom Jenkinson [http://community.jboss.org/people/tomjenkinson] created the discussion
"Re: Remote txinflow: XID changes"
To view the discussion, visit: http://community.jboss.org/message/632705#632705
--------------------------------------------------------------
Hi guys,
I just want to prefix this answer with the statement that given unlimited data length I don't mind whether or not node names were encoded as Strings, Ints, BLOBs or GLOBs.
The administration of this thing is one thing. But in terms of the XID structure it only has 64 bytes to play with in the bqual.
The bqual needs the following:
1. Sequence number - we all agree with this
2. Parent node name - This is vital for recovering orphan subordinate transactions as explained above
3. Subordinate node name - This is vital for recovering orphan subordinate resources as explained above
4. EIS name - required for debug
Lets say we keyed the EIS name down to an int - 4 bytes - using Jonathans suggestion and the algorithm I indicated earlier, thereby paying the performance cost of reading/writing to a dynamic EIS key file and looking up the EIS name in the key map each time.
Next, the sequence number is 28 bytes because it is a Uid, we could look at trying to make this smaller but it needs to be unique within the scope of the gtrid.
That leaves us 32 bytes to encode the two node names (parent and subordinate). If someone can confirm that we can have a validator on CoreEnvironmentBean that says node names that can't be .getBytes("US-ASCII").length'd down to 12 bytes or less can be "throw new CoreEnvironmentBeanException"'d is fine, I can move back to Strings for these within an hour or so (I say 12 bytes so we can write the byte[] and its length - an extra 4 bytes, to be fair we could use a short here so call it 14 bytes as the max getBytes.length of the node name).
I would also need it confirming that we are fine to make the adjustment of the EIS name down to an int which is just logged to file and so admins debugging issues will need to crack open that file to reverse lookup the actual EIS name from the keys which are going to be encoded in the Xids.
Tom
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/632705#632705]
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/20111020/a3d70cb9/attachment.html
More information about the jboss-dev-forums
mailing list