Ok,

here's the algorithm I'm implementing for recovery:

1. For all log files gather all committing Xids
2. For each resource, call recover to get xids
3. commit each resource for xids found in log files
4. For each xid left over for each resource, call rollback

There's really no other way to do it, right?  That's the way it is supposed to 
be done?

The reason I ask this, is that this becomes very tricky with clustering.

One and only one server in the cluster should do recovery.  This is because 
another server may have logs that another server may not have and may cause 
unnecessary rollbacks.

Another potential problem is:  How can even an HA Clustered Singleton perform 
recovery when any other node is live?  Let's say a node fails in the cluster 
and is later re-brought up.  It has a recovery log.  It passes the recovery log 
to the cluster singleton.  Couldn't the singleton possibly rollback live 
transactions?  Does there have to be a stop the world to do recovery?

This may be made easier if the Xid had some information in the globalid of 
which node did the transaction.  Then, you don't rollback Xid's returned by the 
XAResource that don't match that node identifier.

Bill



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3860574#3860574

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3860574


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to