[Seaside] More transaction rambling

Avi Bryant seaside@lists.squeakfoundation.org
Fri, 5 Jul 2002 13:10:53 -0700 (PDT)


On Fri, 5 Jul 2002, Cees de Groot wrote:

> So, you need two transactions, but nested dependent transactions is
> something a lot of databases don't support

Concretely: does OmniBase?  Worry about other databases later ;-).

>, and nested independent
> transactions won't work: if you create the user in an inner transaction
> which is nested independent, the outer transaction will not know about
> the new user, it is not in scope. So you would need to have everything
> in a single transaction, but then you don't match user expectations.

If you have nested independent transactions, can sibling transactions see
each others changes?  That is, if you'll forgive some bizarre pseudocode:

BEGIN (txn A)
BEGIN (txn A.1)
  x = 'foo'
COMMIT
//In the outer transaction, we can't see x, correct?
BEGIN (txn A.2)
  //what about here?
COMMIT
COMMIT

Because I would say that account creation belongs in a separate
transaction from the actual shopping, and if A.2 can see x, I don't
see where the problem is.  If it can't, then I don't understand how any
changes ever get seen at all.

Enlighten me?

Avi