At 1:50 PM -0700 6/1/06, Larry Wall wrote:
As for side-effecty ops, many of them can just be a promise to perform the op later when the transaction is committed, I suspect.
Yes, but it would be important to specify that by the time control is returned to whatever invoked the op, that any side effects will have been successful as well, or a failure/exception is still thrown. What happens in Perl itself and what happens as external side effects are tied together from the invoker's point of view as one unit that should entirely succeed or entirely fail. Even if the side-effects are put off as late as possible in the transaction, we still need to know whether they succeeded or not.
On a related note, if there is some external system used in a transaction that can't guarantee a successful rollback on failure, then any error returned by the Perl op to its invoker should differentiate between whether a failure included a successful rollback in the external system, or whether said system is now possibly or actually in an inconsistent state, so the invoker knows whether or not it should be safe to proceed. Similarly, if the external system can't guarantee successful completion before it returns control, the invoker should know that vs when completion is guaranteed.
In other words, an invoker of an op should know whether the op is ACID compliant in all parts of its operation or not.
-- Darren Duncan