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

DocumentTaskProvider getTasks should rely on an elastic to avoid mongo timeouts

    XMLWordPrintable

    Details

    • Release Notes Summary:
      The task related page providers now rely on Elasticsearch by default.
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      The page providers below have been set to use Elasticsearch by default, make sure you add them to the elasticsearch.override.pageproviders nuxeo.conf property if you've overridden it.

      GET_TASKS_FOR_ACTORS,GET_TASKS_FOR_ACTORS_OR_DELEGATED_ACTORS,GET_TASKS_FOR_PROCESS,GET_TASKS_FOR_PROCESS_AND_ACTORS,GET_TASKS_FOR_PROCESS_AND_NODE,GET_TASKS_FOR_TARGET_DOCUMENT,GET_TASKS_FOR_TARGET_DOCUMENTS,GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS,GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS_OR_DELEGATED_ACTORS
      
      Show
      The page providers below have been set to use Elasticsearch by default, make sure you add them to the elasticsearch.override.pageproviders nuxeo.conf property if you've overridden it. GET_TASKS_FOR_ACTORS,GET_TASKS_FOR_ACTORS_OR_DELEGATED_ACTORS,GET_TASKS_FOR_PROCESS,GET_TASKS_FOR_PROCESS_AND_ACTORS,GET_TASKS_FOR_PROCESS_AND_NODE,GET_TASKS_FOR_TARGET_DOCUMENT,GET_TASKS_FOR_TARGET_DOCUMENTS,GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS,GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS_OR_DELEGATED_ACTORS
    • Sprint:
      nxplatform #120, nxplatform #121
    • Story Points:
      3

      Description

      Using a core page provider may not scale without having lots of indexes in mongodb.

      For instance:

      
      Filter: {"$and": [{"ecm:lifeCycleState": {"$nin": ["ended", "cancelled"]}}, {"ecm:isProxy": null}, {"$or": [{"nt:targetDocumentId": "8bdfea93-939c-4604-afb5-863d335c8c7b"}, {"nt:targetDocumentsIds": {"$in": ["8bdfea93-939c-4604-afb5-863d335c8c7b"]}}]}, {"ecm:primaryType": {"$in": ["RoutingTask", "TaskDoc"]}}]}, Query timed out on client side after socketTimeout exceeded
      
      ...
      org.nuxeo.ecm.platform.query.nxql.CoreQueryUnrestrictedSessionRunner.run(CoreQueryUnrestrictedSessionRunner.java:65) ~[nuxeo-platform-query-api-2021.54.6.jar:?]
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:112) ~[nuxeo-core-api-2021.54.6.jar:?]
      	at org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider.getCurrentPage(CoreQueryDocumentPageProvider.java:156) ~[nuxeo-platform-query-api-2021.54.6.jar:?]
      	at org.nuxeo.ecm.platform.task.core.service.DocumentTaskProvider.getTasks(DocumentTaskProvider.java:267) ~[nuxeo-platform-task-core-2021.54.6.jar:?]
      	at org.nuxeo.ecm.platform.task.core.service.DocumentTaskProvider.getTaskInstances(DocumentTaskProvider.java:112) ~[nuxeo-platform-task-core-2021.54.6.jar:?]
      	at org.nuxeo.ecm.platform.task.core.service.TaskServiceImpl.getTaskInstances(TaskServiceImpl.java:370) ~[nuxeo-platform-task-core-2021.54.6.jar:?]
      	at org.nuxeo.ecm.platform.task.core.listener.DeleteTaskForDeletedDocumentListener.handleEvent(DeleteTaskForDeletedDocumentListener.java:57) ~[nuxeo-platform-task-core-2021.54.6.jar:?]
      

      The PP used in DocumentTaskProvider#getTaskInstances, getAllTaskInstances getCurrentTaskInstances should be redirected to elastic by default.

      See pp in task-pageprovider-contrib.xml
      GET_TASKS_FOR_TARGET_DOCUMENTS, GET_TASKS_FOR_TARGET_DOCUMENT_AND_ACTORS GET_TASKS_FOR_TARGET_DOCUMENT GET_TASKS_FOR_ACTORS
      GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS
      GET_TASKS_FOR_PROCESS
      GET_TASKS_FOR_PROCESS_AND_ACTORS
      GET_TASKS_FOR_PROCESS_AND_NODE
      GET_TASKS_FOR_TARGET_DOCUMENTS_AND_ACTORS_OR_DELEGATED_ACTORS
      GET_TASKS_FOR_ACTORS_OR_DELEGATED_ACTORS

      Check if we can just append the above PP to elasticelasticsearch.override.pageproviders

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: