Subject Re: [Firebird-Architect] Autonomous Transaction Routines
Author Jim Starkey
Nando Dessena wrote:
> Jim,
>
> J> What is the relationship between an autonomous transaction and its
> J> parent? If they are independent, the parent won't be able to see the
> J> results of the autonomous transaction, which is theoretically acceptable
> J> but likely to cause some serious complaint. With a modest amount of the
> J> work, the autonomous transaction could be made visible to the parent but
> J> would still surive rollback of the parent.
>
> We could tell the complainers to use read committed transactions or
> savepoints in such cases. :-)
>
> I believe they are independent in nature. And given the main use cases
> Adriano has underlined, the ability to see a spawned autonomous
> transaction's changes would not be needed very often. I haven't got
> the foggiest idea about how much work would be needed to make the
> changes visible, and I am not sure I (personally) would like to
> anyway.
>
>
>
The implementation of commit retaining uses related transactions with
record visibility suitably fudged. The mechanism and fudge could
probably be extended to take autonomous sub-transactions visible to the
parent transactions.

If this discussion had started with a state of requirements rather than
a solution to an unstated problem, the choice might be easier.

Gentlemen, may I suggest (again) that problems should precede solutions?


--
James Starkey, Senior Software Architect
MySQL Inc., Manchester, MA, USA, www.mysql.com
Office: 978 526-1376