Yuppie wrote at 2003-10-3 10:14 +0200:
 > Yesterday I spent some hours tracking down why catalog Metadata and 
 > catalog Indexes are getting out of sync in my CMF Site.
 > 
 > I found that checkin
 > <http://cvs.zope.org/Zope/lib/python/Products/ZCatalog/Catalog.py.diff?r1=1.98.6.10&r2=1.98.6.11>
 > 
 > including this new condition
 > <code>
 >      if not idxs:
 >          # if the caller specifies that we should update only a
 >          # specific set of indexes, we don't do a metadata update.
 >          self.updateMetadata(object, uid)
 > </code>
 > 
 > Could anybody tell me what's the rationale behind that checkin?
 > 
 > - it breaks backwards compatibility
 > - it's only in Zope-2_6-branch, not in Zope-2_7-branch or HEAD
 > - I can't see what this 'if' is good for anyway

I can ;-)

The "idxs" argument is often provided to update only special indexes:
e.g. workflow indexes or "AllowedRolesAndUsers" and when you
update selected indexes from the "Indexes" tab.
In these cases, it is often not necessary to update the Metadata.

Metadata updates are often monstruous. In one of our applications,
Metadata updates are responsible for a 500 kB transaction
when a single workflow state changes.

I am now advocating not to use Metadata at all.
They are only relevant when you process large result sets
(e.g. for sorting or statistics).


Dieter

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to