When there are 1001+ folders in Alfresco, the following CMIS query is not returning the expected amount of results:
Alfresco runs the query without concern for the pagination and then wraps it into a PagingLuceneResultSet. This is fine as long as you want results that are in the first one thousand. Because of system.acl.maxPermissionChecks, if you request a page that is after the first thousand entries you will get no results. The workaround is to increase system.acl.maxPermissionChecks to 2000 but this would have to be likely further increased in this case if there are more folders in the system. Paginated queries should either go against SOLR or it should be ensured that the database can handle the pagination.
Therefore we have a situation where although you set CMIS to use the database only, it is still restricted by system.acl.maxPermissionChecks
Alfresco 22.214.171.124 and 126.96.36.199
- In an OOTB Alfresco 188.8.131.52 or 184.108.40.206 install, create 1001+ folders.
- Ensure that search service is set to 'Always Use Database' for CMIS queries
- Run the CMIS test class PaginationFailure.java (see class attached) – also find the compiled jar (java -jar testCMIS00582101-0.0.1-SNAPSHOT-jar-with-dependencies.jar)
System.out.println("Number of results in page " + pageNumber + ": " + countInPage);
The output reads:
Number of results in page 33: 10
The output should read (without needing to increase system.acl.maxPermissionChecks beyond 1000):
Number of results in page 33: 30
Is this still expected behaviour as per
MNT-8515 (and others) even though we've configured to always use the db?