[ZODB-Dev] Getting all OIDs from a storage.
Dieter Maurer
dieter at handshake.de
Mon Apr 24 15:20:33 EDT 2006
Jim Fulton wrote at 2006-4-24 10:48 -0400:
> ...
>I would like to have this. I can't find a proposal for it, so I
>guess we should start with that, I'll note that I'd like to have an
>interface like:
>
> oidIterator(class_glob='*')
>
> Returns an iterable of object ids whose dotted class names
> (module_name.class_name) match the given glob.
Are you aware that such an API would pose interesting
concurrency issues?
If you do not lock the storage during the iteration,
it is not unlikely the the iterated over set is
modified during the interation. This poses interesting
semantic questions (what precisely is the returned list?).
On the other hand, you cannot lock the storage
as the iteration is likely to be a very long running operation.
--
Dieter
More information about the ZODB-Dev
mailing list