MySQL Forums
Forum List  »  InnoDB

XA - Problems using XA recovery
Posted by: Tonda David
Date: July 13, 2005 07:58AM

Hello everyone !

At the moment i am working in the Oklahoma University on a project using
mysql and distributed transactions. Until last week we were using Mysql4 and
our own distributed commit protocol (using the normal commit commands).

Last week we started migrating on Mysql 5 since we saw that XA was
implemented and could be very usefull for us.

I am trying to make code a C++ test program that uses XA 2phases commit protocol. I can start , end , prepare , commit or rollback the transactions but my problem is about "xa recovery".
If i understood well the code , xa recovery has to return a list of transaction IDs that have been prepared but not commited. So if there is a probleme when commiting in one server then you can use recover and try commiting again.

But i dont understand how is xa recovery usefull since :
- if the server crash and you try xa recover once it is restarted then xa recover returns nothing.
- if you crash the client : same thing.

In fact , it seems an xa transaction is bound to a connection and if you close the connection then the transaction is always rollbacked.

Shouldn't the server be able to read the logs after a crash and return at least the IDs of the failed prepared transactions ?

Would appreciate SOOOOOOO much is someone could explain me how xa recovery work and how to use it !

Thank you very much,

David Tonda
University of Oklahoma / Uniiversité Lumiére Lyon 2

Options: ReplyQuote

Written By
XA - Problems using XA recovery
July 13, 2005 07:58AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.