Subject Re: [firebird-support] Two phase recovery
Author Ann W. Harrison
Fabiano
>
> Isn't it my case?
> The 2 participants are available and it seems both transactions were prepared.
>

Vlad's right. I had originally written that if any transaction has
committed, all must commit. Then I over simplified and said that if
all are prepared, all will commit. That's not true - if all Firebird
participants in a two-phase commit are found, Firebird asks what to
do. Why? Because there may be some other process involved that the
DBA understands and Firebird doesn't. My usual example is a check
printer. If the check printed, then commit, if not, rollback.

So if any sub-transaction has not yet prepared, rollback. If any
sub-transaction has committed, commit. If every sub-transaction
has prepared and none has committed, then ask. And ask if there's
anyone who can't be found. If some participant is not coming back
(think head crash) the rest of the participants need some way to
proceed.



Regards,


Ann