• Vincent Pelletier's avatar
    ZSQLCatalog: Make _reindexObjectList tolerate duplicate documents · 667c91df
    Vincent Pelletier authored
    When _reindexObjectList receives a document more than once (which may
    happen when multiple different-tag indexation activities are spawned for
    the same document), it would emit a meaningless error, saying that
    document /foo/bar stole the uid of document /foo/bar.
    Instead, fix duplicate tracking and skip such dulicates.
    
    Also, simplify & make _reindexObjectList more robust:
    - Always check path length.
    - Allocate uids before looking for duplicates in catalog (it may not be
      actually needed at this level nowadays).
    - Always check both uid-to-path and path-to-uid mappings.
    - Reuse existing mappings to detect duplicates among objects being reindexed,
      removing the need for assigned_uid_dict.
    - Avoid computing path more than once, as it's expensive.
    667c91df
Name
Last commit
Last update
bt5 Loading commit data...
erp5 Loading commit data...
product Loading commit data...
scalability_test Loading commit data...
slapos Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
CHANGES.erp5.util.txt Loading commit data...
MANIFEST.in Loading commit data...
Products Loading commit data...
README.erp5.util.txt Loading commit data...
setup.py Loading commit data...