Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.4-milestone-1
-
None
-
store migration version cache clear wiki delete
-
Unknown
-
N/A
-
N/A
-
Description
How to reproduce the effects:
1. Go to the WikiManager/CreateNewWiki page and create a simple (empty) wiki named 'testdoublecreation'
2. After it finishes to be created, go to WikiManager/WebHome and delete the just created wiki
3. Repeat step 1
You will see an error like:
Wiki "testdoublecreation" creation failed: Error number 50035 in 5: Exception in plugin xpn.xwiki.plugin.wikimanager.Wiki Manager Plugin?: Wiki testdoublecreation? database update failed Wrapped Exception: Error number 3202 in 3: Exception while reading document name = [XWiki Preferences?, type = DOCUMENT?, parent = name = [XWiki?, type = SPACE?, parent = name = [testdoublecreation?, type = WIKI?, parent = null?]]] Wrapped Exception: could not load an entity: xpn.xwiki.doc.XWiki Document?.
Workaround:
Restart XWiki and the in-memory caches will be cleared so the subwiki can be again created.
Technical details:
The version check will only be null the first time the subwiki is created:
AbstractDataMigrationManager.java
The next times it will always be found in the versionCache because the version cache is never cleared on wiki deletion:
XWikiCacheStore.java #flushCache()
– called by:
XWikiCacheStore.java #deleteWiki()
XWikiCacheStore.java #onEvent() <- triggered by com.xpn.xwiki.plugin.wikimanager.doc.Wiki#delete()
Maybe a solution would be to make AbstractDataMigrationManager implement EventListener and listen to WikiDeletedEvent. Then, on the event, it could set the versionCache key corresponding to the just deleted wiki to null.
Attachments
Issue Links
- is duplicated by
-
XWIKI-7775 Deleting and recreating a subwiki does not work (throws exception)
- Closed
-
WIKITHREEDOTO-72 Exception while create wiki database workspacetemplate
- Closed
-
WIKITHREEDOTO-110 Name of a deleted wiki could not be used for a new workspace
- Closed