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
problem when commiting in one server then you can use recover and try
commiting again.
But i dont understand how is xa recovery is 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
_________________________________________________________________
Bénéficiez de 250 Mo de stockage avec MSN Hotmail http://g.msn.fr/FR1001/866