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)
>>> pt=getattr(app,'')
>>> pr=app.unrestrictedTraverse('Control_Panel/Products/PageTemplates/manage_performRefresh')
>>> pt.getId()
>>> pr()                ## refresh
>>> pt.getId()          ## apparently not deactivated
>>> pt._p_deactivate()
>>> 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/", line 424, in setstate
    self._reader.setGhostState(obj, p)
  File "/home/dieter/ZH/ZopeHead/lib/python/ZODB/", line 203, in 
"/home/dieter/ZH/ZopeHead/lib/python/Products/PageTemplates/", line 
301, in __setstate__
    ZopePageTemplate.inheritedAttribute('__setstate__')(self, state)
AttributeError: 'NoneType' object has no attribute 'inheritedAttribute'
>>> pt=getattr(app,'')         ## 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 - )

Reply via email to