1. 24 Sep, 2022 1 commit
  2. 23 Sep, 2022 4 commits
  3. 22 Sep, 2022 3 commits
  4. 21 Sep, 2022 5 commits
  5. 20 Sep, 2022 2 commits
  6. 16 Sep, 2022 5 commits
  7. 15 Sep, 2022 6 commits
  8. 14 Sep, 2022 2 commits
    • Jérome Perrin's avatar
    • Vincent Pelletier's avatar
      Products.CMFActivity.Activity.SQLBase: Drop "FOR UPDATE". · 89aa2a6b
      Vincent Pelletier authored
      This SELECT option was added when the UPDATE query was split into a
      SELECT + UPDATE query pair, in order to try to avoid deadlocks in mariadb.
        commit 7daaf0a5
        Author: Vincent Pelletier <vincent@nexedi.com>
        Date:   Fri Jun 7 16:53:11 2013 +0200
      
            Work around poor UPDATE use of index.
      That was not completely successful, and another attempt was since made,
      which further ipmproved the situation:
        commit e21aa47f601a98f767e2d3e8490b20b7f409933c
        Author: Vincent Pelletier <vincent@nexedi.com>
        Date:   Fri Sep 17 11:34:46 2021 +0900
      
            CMFActivity.Activity.SQLBase: Reduce the number of deadlocks
      
      This change made the "FOR UPDATE" option obsolete: there should be
      virtually no parallelism between the SELECT and UPDATE queries.
      By which I mean only 3rd-party accesses (like an admin on a mysql console)
      would bypass the SQL lock, causing index-update-level locking issues.
      
      Checking now, I see that removing "FOR UPDATE" on the "node>0" query makes
      that query (with LIMIT 30) run about 5 times faster:
      With FOR UPDATE:    0.509s
      Without FOR UPDATE: 0.090s
      This difference is enough to cause significant activity starvation on a
      63-processing-nodes cluster where such activities run in about 1s, just
      because of the amount of contention on the SQL lock, itself because of the
      duration of every execution of this query.
      
      So remove this now-redundant option.
      
      It is expected that this will improve activity processing performance in
      general, beyond just the starvation issue which led to this discovery.
      89aa2a6b
  9. 13 Sep, 2022 1 commit
    • Xiaowu Zhang's avatar
      erp5_crm: new sale opportunity workflow · cc8740c6
      Xiaowu Zhang authored
      Draft: The first state when we create a new Sale Opportunity.
      
      Open: All information of the Sale Opportunity is entered such as prospect's contact email, questions, etc
      
      Suspended: We replied to prospect, waiting for their return.
      
      Closed: The Sale opportunity is either 1) accepted by prospect, turn into a Sale Order; or 2) Clearly rejected by prospect.
      
      Expired: No return/ news from prospect for some time.
      
      Deleted: in case added by mistake, so user can delete it
      cc8740c6
  10. 09 Sep, 2022 2 commits
  11. 07 Sep, 2022 4 commits
  12. 06 Sep, 2022 3 commits
    • Kazuhiko Shiozaki's avatar
      Folder: fix objectValues(portal_type=...). · 48cfa07a
      Kazuhiko Shiozaki authored
      For example, Web Section can contain a Script (Python) to set Access
      Rule, but the parent section's objectValues(portal_type='Web Section')
      should not include such object.
      48cfa07a
    • Jérome Perrin's avatar
    • Vincent Pelletier's avatar
      Products.CMFActivity: Fix poor performance with many family-bound activities · 62af8254
      Vincent Pelletier authored
      When there are many simultaneously-pending activities attached to any
      processing node family, the
        node>=0
      subquery becomes dominant (taking hundreds of time longer than the other
      subqueries). As a consequence, this starves processing nodes of activities
      and increases the CPU needs of the mariadb process hosting the activity
      tables.
      So, move this subquery out of the regular codepath, and only run it if no
      other subquery found any activity:
      - there is no activity preferentially targeting the current node
      - there is no activity bound to any of the current node's families
      - there is no activity without any node preference at all
      Also, simplify the content of that subquery: the effective priority can
      only be 3 * priority + 1 when this query is run, and node=0 rows can be
      excluded (they should not exist in the current database view).
      Also, factorise the logic producing "node=processing_node" and
      "node IN node_set" subqueries, for simplicity. In turn, this makes all
      family-dependent subqueries use a simple equality test, ensuring a stable
      query plan independently from the number of families the current node is
      member of.
      Also, use "UNION ALL" always, as now:
      - all subqueries have stritly distinct result sets
      - as per mariadb documentation, "UNION [DISTINCT] applies to all UNIONs
        on the left", so the original comment about where ALL is used was
        incorrect in assuming it was improving the effective query performance
      Also, line-split SQL queries as visible in the python source to be more
      readable, without effect on the produced SQL.
      Also, line-split a few non-trivial python expression to make their
      internal structure immediately apparent.
      
      Another effect of this change this change is to reduce activity theft
      (activities to be preferentially executed by one node being executed by
      another), potentially improving object cache hit-rate and hence decreasing
      I/O pressure on the ZODB.
      62af8254
  13. 05 Sep, 2022 2 commits