An error occurred fetching the project authors.
  1. 17 Feb, 2017 1 commit
    • Vincent Pelletier's avatar
      CMFActivity.Activity.SQLBase: Catch DatabaseError. · 8c80c05b
      Vincent Pelletier authored
      Fixes browsing ERP5 documents without activity tables available.
      Of course, as most modifications trigger activity creation, no
      modifications are possible. But this improves read-only access in
      degraded conditions.
      Also, by design a successful query must return one line, so do not test
      returned value before processing it.
      8c80c05b
  2. 15 Jun, 2015 1 commit
  3. 06 May, 2015 2 commits
    • Julien Muchembled's avatar
      CMFActivity: slightly delay non-executed grouped messages · c85a840f
      Julien Muchembled authored
      When grouped messages fail, ActivityTool must distinguish 3 groups,
      in order to reexecute them separately, as follows:
      - first, those that succeeded
      - then, those that were skipped
      - at last, failed ones
      
      Grouping methods are updated to handle partial failures, and stop doing
      anything when something goes wrong.
      
      Without this, we would have the following pathological cases.
      
      1. Let's suppose first that skipped messages are marked as succeeded.
      
      The problem is that each skipped message that will fail causes the reexecution
      of those that didn't fail.
      
      Exemple: A:ok B:ok C:err D:err E:err F:err
        1: A:ok, B:ok, C:err, D:skipped, E:skipped, F:skipped
        2: A:ok, B:ok, D:err, E:skipped, F:skipped
        3: A:ok, B:ok, E:err, F:skipped
        4: A:ok, B:ok, F:err
        5: A:ok, B:ok -> commit
      
      And worst, the first failed (C) may be processable again before 5, entering
      a failing loop if it is executed again in the same group as A & B.
      
      2. Another implementation is to mark all skipped as failed.
      
      Example:
        1: A:ok, B:ok, C:err, D:skipped, E:skipped, F:skipped
        2: A:ok, B:ok -> commit
        3: C:err, D:skipped, E:skipped, F:skipped
       >3: same as 3
      
      => D, E or F are never tried.
      c85a840f
    • Julien Muchembled's avatar
      CMFActivity: in case of ConflictError, retry earlier than for other failures · 30fbdd3d
      Julien Muchembled authored
      This tweaks retry delays as follows (seconds):
      
              ConflictError  other failures (K = 1 + retry², with retry >= 0)
      before     30             15 * K
      after      15             30 * K
      
      Today, bigger delays in case of errors should not be an issue because the
      quality of ERP5 has improved a lot and normal code should not rely anymore on
      this.
      
      We also don't want to lower ConflictError delay too much, because this
      increase the probability of conflicts.
      
      This will be required to improve invokeGroup, in case that a message fails.
      We'd like that:
      - successful messages are retried immediately
      - skipped messages are retried next, and separately
      - at last, failed messages are retried, also separately
      30fbdd3d
  4. 31 Mar, 2015 1 commit
  5. 30 Mar, 2015 1 commit
  6. 27 Mar, 2015 1 commit
    • Julien Muchembled's avatar
      CMFActivity: automatic migration of queues and removal of button to recreate tables · 3d644bde
      Julien Muchembled authored
      The action to recreate activity tables while preserving existing messages
      was unsafe for 2 reasons:
      - if any error happened, messages could be lost
      - it relied on Message.reactivate
      
      Which this patch, any instance created after commit d881edd1 (Aug 2010) will
      upgrade successfully. For older instances, make sure you have no activity left.
      
      For cases where 'ALTER TABLE' would not work, a better way to implement repair
      functionality would be:
      - one action to backup all messages in ZODB
      - and another to restore them
      And maybe a security so that during the backup-clear-restore sequence,
      activities can't be created nor processed.
      
      If any column is added in the future, it would still be possible to write code
      that fills them by inspecting messages.
      3d644bde
  7. 25 Mar, 2015 1 commit
  8. 04 Sep, 2014 1 commit
  9. 27 Nov, 2013 1 commit
  10. 11 Jun, 2013 1 commit
    • Vincent Pelletier's avatar
      Work around poor UPDATE use of index. · 7daaf0a5
      Vincent Pelletier authored
      UPDATE query is exected to use the existing index on (processing_node,
      priority, date) both for WHERE and ORDER BY, as is expected from
      EXPLAIN-ing the equivalent SELECT:
      
      MariaDB [erp5]> explain select uid from message_queue WHERE processing_node=0 AND date <= '2013-06-06 22:22:49' ORDER BY priority, date LIMIT 1;
      +------+-------------+---------------+------+----------------------------------------------------------+-------------------------------+---------+-------+-------+--------------------------+
      | id   | select_type | table         | type | possible_keys                                            | key                           | key_len | ref   | rows  | Extra                    |
      +------+-------------+---------------+------+----------------------------------------------------------+-------------------------------+---------+-------+-------+--------------------------+
      |    1 | SIMPLE      | message_queue | ref  | processing_node_processing,processing_node_priority_date | processing_node_priority_date | 2       | const | 26622 | Using where; Using index |
      +------+-------------+---------------+------+----------------------------------------------------------+-------------------------------+---------+-------+-------+--------------------------+
      
      If it weren't using the index for ORDER BY, "Extra" would contain
      "Using filesort".
      
      Still, UPDATE behaves differently:
      
        # User@Host: user[user] @  [10.0.0.3]
        # Thread_id: 1635880  Schema: erp5  QC_hit: No
        # Query_time: 2.668405  Lock_time: 2.460698  Rows_sent: 0  Rows_examined: 49263
        # Full_scan: No  Full_join: No  Tmp_table: No  Tmp_table_on_disk: No
        # Filesort: Yes  Filesort_on_disk: No  Merge_passes: 0
        SET TIMESTAMP=1370557446;
        UPDATE
          message_queue
        SET
          processing_node=12
        WHERE
          processing_node=0
          AND DATE <= '2013-06-06 22:24:04'
          ORDER BY
          priority, DATE
        LIMIT 1;
      
      So change the UPDATE..SELECT pattern into a SELECT FOR UPDATE..UPDATE
      pattern, so SELECT's correct execution plan is used.
      7daaf0a5
  11. 10 Jun, 2013 1 commit
  12. 22 Apr, 2013 2 commits
    • Julien Muchembled's avatar
      CMFActivity: move message serialization code to Message class · ee2edadb
      Julien Muchembled authored
      Later, we might want to do more processing after loading, or before dumping,
      accessing private Message data.
      ee2edadb
    • 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
  13. 18 Apr, 2013 1 commit
  14. 15 Apr, 2013 1 commit
  15. 26 Nov, 2012 1 commit
  16. 27 Apr, 2012 4 commits
  17. 02 Jan, 2012 1 commit
  18. 28 Dec, 2011 1 commit
  19. 19 Oct, 2011 2 commits
  20. 17 Oct, 2011 1 commit
    • Julien Muchembled's avatar
      Drop support for Zope 2.8 · 48212534
      Julien Muchembled authored
      Checked following occurrences in comments:
      - "Python 2.[456]"
      - "Zope 2.[891]"
      - "BBB"
      - "BACK"
      
      Checked uses of:
      - email, hashlib, numpy & tarfile (modules)
      - ImportError
      - string.Template
      - suppress_events (parameter of _setObject)
      
      Excluded:
      - some forked modules (MailTemplates, PortalTransforms...)
      - some i18n compatibility code
      48212534
  21. 02 Aug, 2011 2 commits
  22. 29 Oct, 2010 1 commit
    • Sebastien Robin's avatar
      Commit fix done by Julien and Leonardo · c663257f
      Sebastien Robin authored
      Activities could read from the ZODB an state older than the one
      that caused the activity to be created, if:
      1.Zope client node (node A) processing an activity  message is different
        than the one that created the activity (node B),
      2.The object cache for node A contains objects concerning the activity
        message (or its container)
      3.The node A hasn't yet received the invalidation message from the ZEO
        server, for instance, if its still on the network layer (kernel buffers,
        routers in between, etc...)
      
      The simplest fix for this issue is sending a synchronous message to the
      ZEO server before the beginning of a transaction. This message will act
      like a “network barrier”, making sure that any invalidation messages
      sent before that point from the ZEO server are already received, and the
      transaction can begin with an “updated enough” state.
      
      Additional note from Yoshinori : This patch must be proposed to zope
      developpers as soon as possible and see with them if this way is the
      best.
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39710 20353a03-c40f-0410-a6d1-a30d3c3de9de
      c663257f
  23. 14 Sep, 2010 1 commit
  24. 20 Aug, 2010 1 commit
  25. 11 Aug, 2010 3 commits
  26. 28 Apr, 2010 1 commit
  27. 06 Apr, 2010 1 commit
  28. 19 Feb, 2010 4 commits