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

Enable DocumentRoutingEscalationServiceImpl.queryForSuspendedNodesWithEscalation query alternative

    XMLWordPrintable

    Details

      Description

      Same than in NXP-14893: DocumentRoutingEscalationServiceImpl.queryForSuspendedNodesWithEscalation makes a very slow query and fetch.

      2014-07-29 06:45:01,301 INFO  [Quartz_Worker-1][org.nuxeo.ecm.core.storage.sql.SessionImpl] duration_ms:	1279.99	QueryFilter(principal=system, limit=0, offset=0)	queryAndFetch	Select DISTINCT ecm:uuid from RouteNode WHERE ecm:currentLifeCycleState = 'suspended' AND ( rnode:escalationRules/*1/executed = 0 OR rnode:escalationRules/*1/multipleExecution = 1 ){}
      java.lang.Throwable: Slow query stack trace
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.queryAndFetch(SessionImpl.java:1295)
      	at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.queryAndFetch(ConnectionImpl.java:375)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession$SQLSessionQuery.executeAndFetch(SQLSession.java:629)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.queryAndFetch(SQLSession.java:546)
      	at org.nuxeo.ecm.core.api.AbstractSession.queryAndFetch(AbstractSession.java:1676)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:136)
      	at com.sun.proxy.$Proxy105.queryAndFetch(Unknown Source)
      	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingEscalationServiceImpl$1.run(DocumentRoutingEscalationServiceImpl.java:57)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:115)
      	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingEscalationServiceImpl.queryForSuspendedNodesWithEscalation(DocumentRoutingEscalationServiceImpl.java:54)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener$1.run(DocumentRoutingEscalationListener.java:64)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:156)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener.triggerEsclationRulesExecution(DocumentRoutingEscalationListener.java:59)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener.handleEvent(DocumentRoutingEscalationListener.java:52)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:215)
      	at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:116)
      	at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:59)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      

      Note there is a clause on a complex property. When supported in Elasticsearch, it will need to be redefined in a page provider that it can be easily directed to ES.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                grenard Guillaume Renard
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: