On 11/9/05, David Binger <[EMAIL PROTECTED]> wrote:
> On Nov 9, 2005, at 10:37 AM, Jeremy Hylton wrote:
> > How do you find all the references?  It seems like you would need to
> > execute a transaction that iterated over every object in the storage
> > and searched the pickle for references to the class.
> You do need to do this to find the references (using referencesf()?),
> but it doesn't necessarily need to happen in one giant transaction.
> The script just needs to (load and) re-pickle every instance with a
> reference
> while the sys.modules hack is in place.  Commit each referring instance
> in a new transaction if you like, and conflict errors should
> not be a problem.

I suppose you could run a separate thread that performed this
conversion in parallel with other activities.  There's a bit of a
coordination problem to make sure you're done.  It seems other
application code would need to use the old class definition until the
update was completed, but that means new references can be created
while the update is running.  So you'd need some sort of coordination
to atomically switch from old class to new class when the update was

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to