Details
-
Bug
-
Resolution: Fixed
-
Major
-
16.10.0
-
None
-
Integration
-
Unknown
-
N/A
-
N/A
-
Description
Some REST resources return their results in a random, database-defined order instead of a deterministic order.
Affected resources:
- All pages of a wiki: /rest/wikis/xwiki/pages?number=25&start=0
- All attachments of a wiki: /rest/wikis/xwiki/attachments?number=25&start=0
- Attachments of a space: /rest/wikis/xwiki/spaces/Sandbox/attachments?number=25&start=0
- Attachments of a page: /rest/wikis/xwiki/spaces/Sandbox/pages/WebHome/attachments?number=25&start=0
- Pages of a space, ordered by date: /rest/wikis/xwiki/spaces/Sandbox/pages?order=date&number=25&start=0 - ordered by date but there may be same-date documents where the date/time is not unique like from extensions installations.
The actual behavior depends on the database. On some databases, the order might be random but stable, on others, in particular Postgres and possibly Oracle, the order might change even with different pagination offsets, meaning that it is impossible to cleanly paginate over the results. Effects should be more visible with larger result sets (more pages/attachments in a wiki/space/page).