Ticket #2183 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Unicode upgrades should not depend on the catalog

Reported by: gracinet Owned by: madarche
Priority: P1 Milestone: CPS 3.5.1
Component: CPS (global) Version: 3.5.1rc1
Severity: normal Keywords: unicode upgrade catalog


For example, the current CPSSharedCalendar unicode upgrade uses the catalog to find the calendar objects. This is for obvious performance reasons. The problem is that the catalog can be severely broken during the overall unicode upgrade process. Once it is broken, there's no way to have the calendars indexed again, and therefore no way to upgrade them…

The documents upgrade is unaffected, because it works on the repository directly (Calendar objects aren't CPSDocuments). The problem will be the same for all similar products (CPSWiki, CPSBlog, etc.)

Bottom line is still that there's no way to avoid crawling the whole site. We need

  • a nice, memory efficient folders crawler,
  • upgrade steps should be designed with a part invoking the crawler and a part working in a given folder (e.g, "upgrade all the Calendar objects in this folder")
  • later on, a global unicode upgrade cpsjob #2184 could call them in one single crawling (important for large sites)

Change History

comment:1 Changed 9 years ago by gracinet

Done, and pushed to hg.cps-cms.org. Two new functions are provided:

from Products.CPSCore.ProxyBase import walk_cps_folders
from Products.CPSCore.ProxyBase import walk_cps_folderish

They both derive from CPSCore.utils.walk, specifying the correct meta_types. The first is been used by the new version of upgrade step for CPSSharedCalendar.

At lower level, there is a new iterValues method on all CPSBaseBTreeFolder. It allows for meta_types filtering, using the meta_type index of BTreeFolder2, ie, it should be a true iterator in all cases.

comment:2 Changed 9 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed

CPSWiki and CPSSharedCalendar upgrade steps now use this. Lots of cps jobs will benefit from the new iterators (generators, actually)

Note: See TracTickets for help on using tickets.