[ 
https://issues.apache.org/jira/browse/GERONIMO-4184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007792#comment-13007792
 ] 

David Jencks commented on GERONIMO-4184:
----------------------------------------

I think this patch will break recovery.  The first 8 bytes of the byte arrays 
in the xid are a long counter, the rest is the tmid.  Recovery needs to be able 
to determine if an xid coming back from an XAResource came from this tm.  It 
does this by matching the bytes after 8 in the global xid with the baseid in 
the XidFactory.  If the base id is different every time you start the tm, 
there's no way to determine if a branch that has been prepared on an XAResource 
but not recorded in the tm log came from this tm.

I think the problem here is that our documentation is not sufficiently 
insistent that you NEED to configure multiple geronimo servers using the same 
RM with DIFFERENT tmids.

As long as the above is followed, we could randomize the most significant 2 
bytes of the long counter.  However I think it would be better to track the 
counter persistently such as by reserving blocks of say 1024 ids and recording 
this persistently either in a log record or in a separate file.

> In-doubt transaction Id's could be reused during server startup
> ---------------------------------------------------------------
>
>                 Key: GERONIMO-4184
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4184
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: transaction manager
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.1, 2.1.1, 2.1.4
>            Reporter: Kevan Miller
>             Fix For: Wish List
>
>         Attachments: GERONIM-4184.patch
>
>
> During server restart, we may reuse an Xid for a transaction which is 
> in-doubt. Potentially confusing a resource manager. We need to insure this 
> does not occur. Simple way is to remember the largest Xid in tran log and 
> start with a larger number. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to