[ZODB-Dev] Changing namespace - best strategy

Pedro Ferreira pedro at dete.st
Mon Jul 15 15:36:21 CEST 2013


Hello everyone,

We need to move a considerable number of persistent objects (~40K) from
one module to another, and we were wondering what is the best strategy
to follow.

Our database contains around 90M objects, which is a pain to run
`zodbupdate` on. So far these are the options that we thought of:

 * Running `zodbupdate`, possibly restricting the target object set to
   the places where we know that references to the class in question
   exist (otherwise it takes REALLY long);
 * Using the `classFactory`/`find_global` hook and basically converting
   the objects/refs to the new class as they are requested;

The first one seems cleaner and less prone to problems in the future,
but it will take ages (our current benchmarks point towards >1 day,
although we could try to reduce that by limiting the search scope). The
second one seems much easier to execute, but the fact that
objects/references to the old and new classes will co-exist kind of
bothers me.

Has anyone ever done anything like this? Which approach have you
followed? Any suggestions?

Thanks a lot in advance,

Cheers,


Pedro

P.S.: I am sending this from my private mail because this list seems to
have been blacklisted in some servers, including my organization's.

-- 

Pedro Ferreira
http://pferreir.github.com


More information about the ZODB-Dev mailing list