Optmize read acl update by not rebuilding the wall read_acls table
------------------------------------------------------------------

                 Key: NXP-4398
                 URL: http://jira.nuxeo.org/browse/NXP-4398
             Project: Nuxeo Enterprise Platform
          Issue Type: Improvement
    Affects Versions: 5.3 GA
            Reporter: Benoit Delbosc
            Assignee: Thierry Delprat
             Fix For: 5.3.x


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to