[Zope-dev] cPickleCache endless loop...
Toby Dickenson
tdickenson at geminidataloggers.com
Tue Jan 27 19:06:03 EST 2004
On Tuesday 27 January 2004 09:39, Mario Lorenz wrote:
> Given that this property is not that widely published (in the various
> tutorials etc.), I wonder if it might be a good idea to improve that loop
> check code, and walk through the ring not more than once, using a counter,
> and not the comparison vs. the ring start, which, as we have seen, may be a
> target that moves too quickly.
You got me curious....
The attached patch to 2.6 uses an extra temporary ring node to mark where
scanning should stop. Normally this will be right next to the home node, and
behaviour is unchanged. Any of these troublesome objects that move themselves
to the top of the LRU list *during* the scan will end up *after* the scan
terminator node, and therefore do not get rescanned.
This works for me on 2.6, which is the only branch Im set up to use at the
moment.
--
Toby Dickenson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff2
Type: text/x-diff
Size: 3973 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20040128/f17e66af/diff2.bin
More information about the Zope-Dev
mailing list