Subject Re: isc_reconnect_transaction ???
Author Erik Kunze
Ann,

> >does anyone know how to use the API function isc_reconnect_transaction?
> >Especially how to determine the tranaction id of a transaction in limbo?
>
> Take a look at the code in alice/tdr.c and met.e. When a two
> phase commit starts, the id and location of the local transactions
> is recorded in each database. RDB$TRANSACTIONS is the system table
> to look at.

Unfortunately ist not as simple as you may think. My situation is:

o two Classic servers (1,2), two clients (A,B), one database on each server
o both clients access the databases simultaneously with Two-Phase-Commit
o network connection of client A to server 1 breaks
o client A wants to rollback the last transaction

Client A can't roll back the transaction due to the broken network connection

isc_rollback_transaction failed
--> reason: Unable to complete network request to host "1".
-Error writing data to the connection.
-Broken pipe

Since the network connection to server 2 ist still intact, client A could
at least roll back the transaction on server 2, if it would knew the
transaction id.

isc_transaction_info failed
--> reason: Unable to complete network request to host "1".
-Error writing data to the connection.
-Broken pipe

Unfortunately isc_transaction_info sends first (?) a request to server 1. How
can client A ask server 2 for the transaction id? It could connect to server 2
and read RDB$TRANSACTIONS. But how can it be sure, that it doesn't interfere
client B's transactions, that might be in limbo at this point too?

The description of my problem is heavily simplified. I'm working on a wrapper
library for access to Firebird in a cluster of 8 hosts. I must make sure,
that at least one instance of the database ist always available and reliable.

Any help to solve my problem is highly appreciated.

Thanks.
--
Dipl.-Ing. Erik Kunze Phone: +49 - 89 - 32 14 07 41
PHILOSYS Software GmbH Fax: +49 - 89 - 32 14 07 12
Edisonstr. 6 Email: Erik.Kunze@...
D-85716 Unterschleissheim WWW: www.philosys.de/~kunze

PGP-Key: http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0xD5759581