Re: [Zope-dev] ZODB: interface for walking object graph?
"Andrew M. Kuchling" <akuchlin@mems-exchange.org> wrote:
Pavlos Christoforou writes:
On Thu, 23 Mar 2000, Andrew M. Kuchling wrote: instances in place? Lets suppose there is such a function. What should it happen when you do find such an 'unreachable' object. Modify it
You can't find unreachable objects doing a reachability scan starting from the root, so this doesn't matter. Transactions are a tricky problem; if you're trying to modify every instance of C, but someone else is always modifying a C instance, you'll probably never be able to commit. You might have to modify instances in smaller batches and commit after each batch, then.
Paulos Chrstoforou replied:
I was under the impression you were interested in modifying all versions of instances even old ones. Even those can be found during a pack operation at least the pack operation in dbmStorage does find them. If only the 'current' versions are to be modified then things get a lot easier (a python script will do I suppose), unless someone is continously updating the relevant instanceas you've mentioned.
You could do this in a Version, perhaps -- that would lock the instances as they were changed, freezing out the "frequent writers," which isn't that bad an idea if you are changing their class, anyway; the other alternative would be to bring the HTTP server down and run the update in the Monitor. -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
participants (1)
-
Tres Seaver