Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25615

Make the indexing of remote extensions resilient to a failing or incomplete search page

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 12.10
    • Extension
    • 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

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: