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

Fix SQL Server Slow query at session startup when disabling ACL optimization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.8.0-HF18, 5.9.4
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Elasticsearch

      Description

      On SQL Server, when a non-admin user tries to login, the following query is executed from StartupHelper.java:

      "SELECT * FROM Domain WHERE " + NXQL.ECM_MIXINTYPE
                          + " <> '" + FacetNames.HIDDEN_IN_NAVIGATION + "' AND "
                          + NXQL.ECM_LIFECYCLESTATE + " <> '"
                          + LifeCycleConstants.DELETED_STATE + "'"
                          + " AND ecm:isCheckedInVersion = 0 "
                          + " AND ecm:isProxy = 0 ";
      

      This won't scale at all with the ACL optimization is disabled at least on SQL Server. For more than ~260000 docs, the query will eventually return after 15- 20 minutes.

      A solution could be a seam bean with the same Name annotation and the correct precedence within the nuxeo-elasticsearch bundles to redefine org.nuxeo.ecm.webapp.helpers.StartupHelper behavior and make it query ES.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: