[elephant-devel] Re: recreate-instance-using-class
Robert L. Read
read at robertlread.net
Tue Jan 8 19:38:20 UTC 2008
Thank you very much, Sean. I suggest you work with Henrik and Alex and
I on this as well (possibly off-line, outside of this forum.)
In case it helps, here is what I tried to do, and what I think I
discovered. Please forgive me if I am inconsistent; I clearly have been
confused on some of these points. This has been a learning process for
me; I am writing this only in hopes of saving you time.
1) It so happens that some of the elephant objects do exactly what we
are discussing --- that is, they do special initialization in
"shared-initialize".
2) The test always worked for me (the first time they were run.) When
I ran them the second time, I had failures. I am not 100% sure this had
to do with your patch or not...it is possible that I have an SBCL error
or some other problem.
3) It seems straightforward to rewrite the "make-instance" and
"shared-initialize" methods to separate things into an auxiliary
initialization function called by "make-instance" and
"recreate-instance-using-class". However, this is tricky when it comes
to pm-indexed-btree, the classes that implement the secondary cursors.
There may be some danger that "persistent-slot-writer" puts us in a
foward-reference problem: You're trying to initialize the class but the
initialization code assumes that make-instance has already been called,
but something it requires is not initialized. I think if I clear
headed-person understood exactly the object creation protocol, they
could probably refactor it out successfully.
4) Given the multiple inheritance of "pm-indexed-btree" (a subclass of
"indexed-btree" and "pm-btree", it was not clear to me exactly what
order the MOP stuff got called. It is possible that some subtle aspects
of this are even lisp-dependent.
So, in summary, what I tried to do was to rewrite the files in
src/db-postmodern so that they were properly initialized by
recreate-instance-using-class. I was never able to get this to work,
and whether that is due to my own confusion (I have bronchitis at the
moment) or some weirdness in SBCL I can't say.
I suggest you and Ian come up with the "reconstitution" protocol which
he has proposed. I'm happy to work to on this, but I don't feel that I
understand common usage of LISP --- all of my coding has in LISP has
been in complete isolation outside of this list.
On Tue, 2008-01-08 at 17:45 +0000, Sean Ross wrote:
> Hi all,
>
> I'm sorry to hear that my patch caused so many issues with postmodern
> and I'm quite keen to investigate the cause of this. I'll be
> installing setting up the postmodern backend and seeing if I can track
> down the causes of these problems.
>
> As to where to go from here I do agree with robert on this and that it
> is nice to have the seperation between the creation and restoration of
> instances although I think this needs to be done with a well thought
> out protocol.
>
> cheers,
> sean.
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list