Hi,

I started to play with this concept. The idea is to able to have encapsulated operations using their own transactions, following these rules :

1) if there is another pending Read transaction, and if the new operation is read only, then reuse the pending transaction 2) if there is another pending Read transaction, and if the new operation is ReadWrite, then create a new transaction 3) if there is another ReadWrite transaction, then generate an error (we can't have such a case)

That means we can have a non limited number of encapsulated RO txns, but we can't have more than one RW txn running.

RO(RO(RO...(RO)...))) is possible
RO(RO(RW))) is possible
RO(RO(RW(RO is not possible
RW(RO is not possible
RW(RW is not possible

In order to implement that, we need to add one thing :
- a nbRef in readOnly transactions, which will be incremented and decremented as soon as we add new RO txns or abort/commit txns

Is that enough ?

--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to