[elephant-devel] Re: Getting count of the number of persistent objectsof a particular class

Joubert Nel joubert at joubster.com
Mon Jan 21 15:29:10 UTC 2008


On Mon, 2008-01-21 at 09:54 -0500, Ian Eslick wrote:
> In general, instance initialization should always happen inside a  
> transaction.  This will catch any updates you do to indices or other  
> variables.
> 
> The instance initialization code in Elephant only forces transactions  
> for subsets of initialization that use cursors, and which under BDB  
> would lead to deadlocks or other errors.  This allows developers  
> flexibility in breaking up large initialization transactions but the  
> consequence is that the set of side effects of a default call to make- 
> instance are not atomic unless wrapped in a transaction.

OK, so if I add an initialize-instance :after method, for example, then
a call to (make-instance 'persistent-class) must now be called from
within a transaction to ensure atomicity?


Joubert




More information about the elephant-devel mailing list