[elephant-devel] postmodern btree problem

Alex Mizrahi alex.mizrahi at gmail.com
Mon Jan 5 10:30:11 UTC 2009


>  In the BDB backend I
> persist data for indexed-btrees so I make that a persistent-metaclass
> and thus shared-initialize always gets called.  pm-btree is a unique
> case that wasn't handled.

pm-indexed-btree is of persistent-metaclass, pm-btree is not, for  
bootstrapping
reasons.

> My solution is to clean things up and call recreate-instance on all
> class types (standard-class and persistent-metaclass).

> recreate-instance (standard-object) - does nothing

this way it has no chance to initialize its "transient" slots, that is not  
fair..
well, people who need something advanced could just use  
persistent-objects..

> recreate-instance (persistent-collection) - caching, shared-initialize
> (no schema support for bootstrapping purposes)

> PS - Anyone know why we chose to use recreate-instance instead of
> hooking into reinitialize-instance?

because we need to allocate-instance first, i guess.

but i think that perhaps we could eliminate three branches there, just  
calling reinitialize-instance (or shared-initialize with slot-names being  
NIL directly) after allocate instance -- in this case, as i understand, we  
won't have problems with unbound slots being filled with initforms, and  
objects will have a chance to do initialization in uniform way.

as for persistent-specific initialization, i guess we can place it into  
shared-initilize :before, or into reinitialize-instance.





More information about the elephant-devel mailing list