Not sure if Jeremy still on this list so CCing...
Tim Peters wrote:
No, I don't. The internal docs/comments are inconsistent on this
point. FileCache.settid() starts with
# Update our idea of the most recent tid.
Is this the most recently used or the most recently available?
(possible off-by-one error)
This is stored in the
# instance, and also written out near the start of the cache file. The
# new tid must be strictly greater than our current idea of the most
# recent tid.
def settid(self, tid):
and that comment matches the code you've seen failing.
Indeed, but that code is just a check ;-)
OTOH, this is
# Set the last transaction seen by the cache.
# @param tid a transaction id
# @exception ValueError attempt to set a new tid less than the current tid
def setLastTid(self, tid):
The coments there say it's an error only if the new tid is < the
current tid, which is most reasonably taken to mean "strictly less".
That doesn't match the code wrt behavior when the tids are equal.
The only other report of your traceback I'm aware of is part of this
confused bug report, in its Comment #4:
That's also complaining about a "new" tid exactly equal to the
"previous" tid during verification.
Yeah, I saw that too, well, at least I'm not the only one ;-)
My best guess now is that the setLastTid() comments record the actual
intent, and that settid() is overly restrictive here in not allowing
equality. But I don't understand/remember the details of cache
verification well enough to be sure.
In a perfect world, we could change it and see what tests fail.
I'm not that brave ;-)
The patch you found was me changing settid()'s code to match
settid()'s comments and the text of settid()'s error message. I doubt
I noticed that those comments and the error message disagreed with
setLastTid()'s comments at the time, and expected Jeremy to complain
if he thought the change was wrong. He still can, if he remembers the
Well, I never saw these errors (which are from a specific check now
based on a comment which may not have been correct as judged by my
extremely limited understanding ;-) with Zope 2.7, which is the last
version of Zope this instance ran on before 2.9...
Dunno if that helps at all :-S
Simplistix - Content Management, Zope & Python Consulting
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org