• Julien Muchembled's avatar
    CMFActivity: remove non-executable message state (-3) · e47f2923
    Julien Muchembled authored
    When an object is deleted, higher level code used to flush its messages (without
    invoking them). However, a concurrent and very long transaction may be about to
    activate such an object, without conflict. We already experienced false -3
    errors that could prevent other messages to be validated.
    
    Because there is no efficient and reliable way to flush absolutely all messages,
    messages on deleted objects are now ignored and deleted without any email
    notification. There's only a WARNING in logs. But for performance reasons,
    there's still a flush on object deletion.
    
    To simplify code, messages that went to -3 for other reasons, like a
    non-existing method, now go to -2. In fact, this was already the case for
    grouped messages.
    
    In case that a path is recycled, it may still be possible for a message to be
    executed on a wrong object (the new one), instead of being ignored (because the
    activated object was deleted). So in such scenario, developer should make sure
    not to delete an object that may be activated in a concurrent transaction.
    If the original object has an OID at the moment it is activated, an assertion
    will make sure the message is not executed on another object.
    e47f2923
ActiveObject.py 7.84 KB