-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: coldstorage-10.0.0
-
Fix Version/s: coldstorage-2021.1, coldstorage-10.1
-
Component/s: ColdStorage, Glacier
-
Release Notes Summary:
-
Tags:
-
Sprint:nxplatform #72
-
Story Points:1
On a huge repository, we can see:
Invalid command produces an empty document set
, and you can see the NXQL query
SELECT * FROM Document, Relation WHERE ecm:mixinType = 'ColdStorage' AND coldstorage:beingRetrieved = 1
In the stack trace you can see the mongodb version of the query and the reason of the failure:
Query timed out on client side after socketTimeout exceeded
As a matter of fact, the Cold Storage addon scans the repository to check the documents on which a retrieve has been requested. This scan is scheduled every hour:
- https://github.com/nuxeo/nuxeo-coldstorage/blob/lts-2021/nuxeo-coldstorage/src/main/resources/OSGI-INF/coldstorage-events-contrib.xml#L6
- https://github.com/nuxeo/nuxeo-coldstorage/blob/lts-2021/nuxeo-coldstorage-package/src/main/resources/install/templates/coldstorage/nuxeo.defaults#L7
and performs a query like
SELECT * FROM Document, Relation WHERE ecm:mixinType = 'ColdStorage' AND coldstorage:beingRetrieved = 1
We added an index for 2021, https://github.com/nuxeo/nuxeo-coldstorage/blob/lts-2021/nuxeo-coldstorage/src/main/resources/OSGI-INF/coldstorage-core-types-contrib.xml as per NXP-29261 but this is not available for 10.10.
We should add recommendations in the README to manually create such an index in 10.10.