Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
12.10
-
None
-
Unknown
-
Description
When indexing the extensions of a remote searchable repository, ExtensionIndexJob requests the extensions by pages of 100 and stops as soon as a page contains fewer extensions than requested (result.getSize() < SEARCH_BATCH_SIZE). It also stops processing the whole repository at the first error, logging a single "Failed to get remote extension from repository" warning.
This makes the indexing fragile: a single page that fails (or that contains fewer extensions than the server announced, for example because the client skipped an invalid entry since XCOMMONS-3863) means none of the following pages are indexed, so the remote extensions after it are never added to the index and their recommended/rating/support plan information is never updated.
It would be more robust to:
- decide when to stop based on the total hits returned by the repository rather than on the size of the page
- skip (and log) a failing page and continue with the next ones instead of stopping the whole repository
Found while investigating XCOMMONS-3863, where a single extension without version on extensions.xwiki.org prevented about 230 remote extensions from being indexed.
Attachments
Issue Links
- relates to
-
XCOMMONS-3863 "Failed to get remote extension from repository" NPE warning after starting an XWiki instance
-
- Closed
-