-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Query & PageProvider, Workflow
-
Release Notes Summary:The task related page providers now rely on Elasticsearch by default.
-
Tags:
-
Backlog priority:700
-
Upgrade notes:
-
Sprint:nxplatform #120, nxplatform #121
-
Story Points:3
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