List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:July 15 2005 9:10pm
Subject:Re: XA - Problems using XA recovery
View as plain text  
Hi!

On Jul 15, david tonda wrote:
> 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.

I wasn't able to repeat it - after kill -9, and restart, 'xa recover'
listed all prepared transaction for me.

Are you using InnoDB tables ?

> - 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.

Could you submit a bugreport about it ?
 
> Shouldn't the server be able to read the logs after a crash and return
> at least the IDs of the failed prepared transactions ?

It should. (and it does, for me)
 
Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Kerpen, Germany
       <___/  www.mysql.com
Thread
XA - Problems using XA recoverydavid tonda15 Jul
  • Re: XA - Problems using XA recoverySergei Golubchik15 Jul