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

Errors are logged when stopping XWiki while the extension index is being updated

    XMLWordPrintable

Details

    • Unknown

    Description

      Steps to reproduce

      1. Start XWiki with the extension index enabled (default)
      2. Stop XWiki while the extension index job is validating extensions (e.g. right after startup)

      Expected

      XWiki stops without error; the extension index is updated again at the next start.

      Actual

      An error is logged for each extension the job still validates after the extension index store is disposed:

      ERROR o.x.e.i.i.j.ExtensionIndexJob - Failed to validate extension with if [org.xwiki.platform:...] on namespace [...]
      org.infinispan.commons.IllegalLifecycleStateException: ISPN000323: Cache 'extension.index' is in 'TERMINATED' state and so it does not accept new invocations. Either restart it or recreate the cache container.
      	...
      	at org.xwiki.cache.infinispan.internal.InfinispanCache.remove(InfinispanCache.java:81)
      	at org.xwiki.extension.index.internal.ExtensionIndexStore.commit(ExtensionIndexStore.java:245)
      	at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateExtensions(ExtensionIndexJob.java:555)
      	at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateLastExtensions(ExtensionIndexJob.java:231)
      	at org.xwiki.extension.index.internal.job.ExtensionIndexJob.runInternal(ExtensionIndexJob.java:214)
      

      Analysis

      The extension index job runs in its own job thread and nothing stops it when XWiki stops: ExtensionIndexJobScheduler#dispose() only stops its scheduling executor. ExtensionIndexStore#dispose() then disposes the extension.index cache (added by XWIKI-23322), and every following store call of the job fails; ExtensionIndexJob#validateExtensions logs each failure as an error.

      Found in the logs of the flavor UI functional tests on CI (master build 9025), when XWiki is stopped at the end of the tests.

      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: