Playing with Zope Head (as of 2003-12-04) revealed problems with
I see varying behaviour refreshing "CMFCore":
* Refresh is not effective (objects continue the have the old
* After a while, "commit" reports an exception
"ValueError: Cache values may only be in one cache."
Traceback (innermost last):
Module ZPublisher.Publish, line 104, in publish
Module Zope.App.startup, line 223, in commit
Module ZODB.Transaction, line 254, in commit
Module ZODB.Transaction, line 233, in commit
Module ZODB.Transaction, line 352, in _commit_objects
Module ZODB.Connection, line 286, in commit
ValueError: Cache values may only be in one cache.
The following transscript shows strange reproducible behaviour
which is almost surely related to the above:
linux: bin/zopectl debug
Starting debugger (the name "app" is bound to the top-level Zope object)
>>> pr() ## refresh
>>> pt.getId() ## apparently not deactivated
>>> pt.getId() ## obviously a wrong result
>>> pt.aq_base.getId() ## may be explainable as "pt" is not refetched
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/dieter/ZH/ZopeHead/lib/python/ZODB/Connection.py", line 424, in setstate
File "/home/dieter/ZH/ZopeHead/lib/python/ZODB/serialize.py", line 203, in
301, in __setstate__
AttributeError: 'NoneType' object has no attribute 'inheritedAttribute'
>>> pt=getattr(app,'standard_template.pt') ## refetch
>>> pt.getId() ## still wrong
Looks as if "refresh" did not flush the ZODB cache, which still
delivers objects referencing the old classes.
I now know why the above code does not work as I expected:
The new refresh no longer uses "minimize" to flush the ZODB
caches but updates the "code_timestamp".
This causes the cache to be replaced by a new one when
the connection is opened for the next time.
ATT: replacing the cache without clearing it can lead to huge
memory leaks (everything in the old cache is leaked!).
I can not yet explain the original observations...
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -