• Arnaud Fontaine's avatar
    ZODB Components not following ID=(document|extension|test).VERSION.REFERENCE... · 7aeb0739
    Arnaud Fontaine authored
    ZODB Components not following ID=(document|extension|test).VERSION.REFERENCE convention are not importable anymore.
    
    Import mechanism now relies on this convention to find the document in
    portal_components.
    
    This is necessary to get rid of _registry_dict (ZODB Components equivalent of
    document_class_registry), along with several locks. This used to be a mapping
    between (reference, version) to ID stored outside of Zope Transactions as a
    dict on global erp5.component.XXX modules.
    
    This did not work for long transactions such as installing many bt5s:
      1. Transaction1: Install a bt5 with ZODB Component "Foo".
         => Trigger a reset and _registry_dict is cleared.
      2. Transaction2: TimerServer kicks in.
         => Generate _registry_dict without "Foo".
      3. Transaction1: Install another bt5 using "Foo".
         => "Foo" not in _registry_dict and thus considered not present.
    7aeb0739
testBusinessTemplate.py 347 KB