Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-4398

Optmize read acl update by not rebuilding the full read_acls table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3 GA
    • Fix Version/s: 5.3.1
    • Component/s: None

      Description

      The nx_update_read_acls rebuild the read_acls table that contains all possible read acls, then it update the read acls for new documents:

      RAISE INFO 'nx_rebuild_read_acls truncate hierarchy_read_acl';
      TRUNCATE TABLE hierarchy_read_acl;
      RAISE INFO 'nx_rebuild_read_acls update acl map';
      INSERT INTO hierarchy_read_acl
      SELECT id, md5(nx_get_read_acl(id))
      FROM (SELECT id FROM hierarchy WHERE isproperty='f') AS uids;

      This is fine if you have few dozen of acls, with thousands of acls it takes time.
      A simple optimization is to rebuild this table only if we have new entry with an acls.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bdelbosc Benoit Delbosc
                Reporter:
                bdelbosc Benoit Delbosc
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified