[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [bt-spec] When to garbage collect cohesions?
Given that we allow prepare_inferiors and
cancel_inferiors to be called many times during the lifetime of a cohesion, this
raises an interesting garbage collection problem: when is a cohesion finished?
If I send confirm_transaction then the answer is easy. However, consider the
case where prepare_inferiors(all) indicates they all cancelled or resigned, or
cancel_inferiors(all) says likewise, is the cohesion finished? The answer is
"perhaps", or "it depends", since surely I may expect new inferiors to be
enlistable later? But maybe I don't! Perhaps I do want the cohesion to
terminate?
Solution? Several:
(i) we mandate that every user of a cohesion must
send confirm_transaction. Not my favourite option.
(ii) if prepare_inferiors(all) or
cancel_inferiors(all) is used and they indicate all current inferiors have gone
away, then the cohesion is finished. Again, not a great idea but it does cut
down on an explicit "end cohesion" message.
(iii) add an explicit "end cohesion" message. Hmmm,
see above.
(iv) we add a Qualifier that basically says do (ii)
if the conditions are right. The default is don't.
Or maybe I've completely missed something in the
spec that already covers this.
Mark.
----------------------------------------------
Dr. Mark Little, Distinguished Engineer, Transactions Architect, HP Arjuna Labs Email: mark_little@hp.com Phone: +44 191 2606216 Fax : +44 191 2606250 |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC