Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Resource Resolver 1.11.6
-
None
-
None
Description
Initially I thought that the issue just applies to empty alias values, because the paged query will always skip them, due to the first query being "first(sling:alias) > ''".
Closer inspection showed that the pageing logic was flawed:
- read values until pageSize is exceeded and a new key value x is reached
- start a new query with condition > x
This worked mostly ok with vanity paths, where the search key "first(sling:vanityPath)" almost always changes (having the same value for many resources will only lead to one working vanity path, because the same path cannot map to multiple resources).
For aliases the situations is different, because their value is locally scoped to the collection the aliased resource appears in. So we could have 10000 resources with the same set of aliases (think translations or shortcuts), and in cases like these, the page size (right now 2000) would be exceeded.
The proposed change is:
- always use ">=" so the initial page contains the empty-valued properties as well
- when page size is exceeded and a new key y is found, do not include the last result, but execute a new query right away (with the proper condition so that all resources with "first(sling:alias) >= y" are returned)
- also add more diagnostics, which may help to diagnose pacge size / query limit issues early
Attachments
Issue Links
- is blocked by
-
SLING-12387 ResourceResolver: improve test coverage for PagedQueryIterator
- Closed
- is related to
-
SLING-11799 use keyset pagination for sling:alias query
- Closed
- links to