Details
-
Bug
-
Resolution: Fixed
-
Major
-
18.4.2, 18.6.0-rc-1
-
None
-
Unknown
-
N/A
-
N/A
-
Description
Importing a project in the repository (the "Update project" button of a project page, or ExtensionCode.ImportProject) sometimes does not update the existing project page: it creates a new project page named after the project (e.g. Extension/OAuth2 and OpenID Connect, then Extension/OAuth2 and OpenID Connect 1 on the next try) with a copy of every version page.
It happens on extensions.xwiki.org with org.xwiki.contrib.oidc:oidc: it works most of the time, but once it starts failing on a cluster member it keeps failing there.
Cause
ExtensionStore caches the result of the lookup of the page holding an extension or project id, but the cache key is only the id:
- a lookup of the id as an extension (ExtensionCode.ExtensionClass), for example through the /repository/extensions/<id> REST endpoints or getVersionObject, caches "not found" for a project id, and the following project lookup (ExtensionCode.ProjectClass) gets that cached miss, so the import creates a new page
- the cache is only cleared when the id property of an ExtensionCode.ExtensionClass object changes, so creating or updating a project page does not clear the stale entry
- the key does not include the wiki either, while the lookup query only searches the current wiki
Attachments
Issue Links
- relates to
-
XWIKI-14137 Introduce the concept of extension "project"
-
- Closed
-