Residual database creates error messages

After fiddleing a little too much with one of our subwikis (especially renaming), we seemingly have a zombie database. All our subwikis are functioning as expected (at least as far as we can see, even the renamed one). Still, when checking for upgrades for all our subwiki extensions from the main wiki admin section, we get a bunch of messages like these:

Starting job of type [upgradeplan] with identifier [extension/plan/]
Resolving extension [Office Importer Application 13.10.5] on namespace [<OUTDATED_SUBWIKI_NAME>]
Since database [<OUTDATED_SUBWIKI_NAME>] needs to be migrated, it couldn't be safely used! Please check your configuration to enable required migration for upgrading database from version [1008010] to version [130406000]

where <OUTDATED_SUBWIKI_NAME> is an intermediate name of the aforementioned subwiki.

Obviously we did an upgrade recently, which after some hard work, finished as expected and runs smoothly now for the main and all other subwikis. Before the upgrade we occasionally had error messages concerning this zombie subwiki as well.

What would be the best way to get rid of this database? What could be the reason for such a left over? Are there any potential dangers involved in deleting the database in mysql or better, where should we erase it, to get rid of the messages without causing trouble elsewhere?

Any suggestions and hints much appreciated!

Best regards,

I would like to resurrect the topic. Does anyone have an idea, or suggestions on how to tackle this situation. Is there any harm to be expected from just deleting the database? Or can someone point me to the documentation to read about the topic?

We now started the experiment to just delete the database on MariaDB side. When checking for extension upgrades, we now receive the errors:

Starting job of type [upgradeplan] with identifier [extension/plan/]
Resolving extension [org.xwiki.platform:xwiki-platform-watchlist-ui/11.6.1] on namespace [<OUTDATED_SUBWIKI_NAME>]
SQL Error: 1049, SQLState: 42000
(conn=11) Could not select database '<OUTDATED_SUBWIKI_NAME>' : Unknown database '<OUTDATED_SUBWIKI_NAME>'

When we check the Watchlist Application, which of course is uninstalled in all our actual subwikis, then it says in the extensions module:

Installiert in den folgenden Wikis
    <OUTDATED_SUBWIKI_NAME>, von Unbekannter Benutzer am 08.10.2020

Could someone please point us to somewhere we can find a hint for the source of these hidden references? We just have no clue where to look for them.

Finally, we simply decided to recreate a new subwiki with the <OUTDATED_SUBWIKI_NAME> name and rightaway deleted it afterwards. That solved the issues. No more errors in the logs and Extension Manager UI.

Feels more like an effective hack-around, but definitely solved the issue.

So, yes, it resolved the issues with the extension manager UI, but…

When creating a new subwiki, the logs start with:

Starting job of type [wikicreationjob] with identifier [wikicreation/createandinstall/testSubwiki]
SQL Error: 1049, SQLState: 42000
(conn=6692) Could not select database '<OUTDATED_SUBWIKI_NAME>' : Unknown database '<OUTDATED_SUBWIKI_NAME>'

I am still wondering what is causing these errors and if this affects the performance of our wiki potentially causing future crashes.

Any news on this? Did you see any performance issues in your wiki? We’re having the same SQL Error when creating a subwiki and wonder if it’s safe to ignore it.

No news unfortunately. We do not see any issues so far, although the error messages are a little alarming still.

1 Like

I remember that some older versions of XWiki did not clean up the information about a sub wiki from the extension repository when that sub wiki was deleted. As that bug has been fixed in the mean time creating a sub wiki with the same name and then deleting is indeed a clean way to fix that issue.

However I also noticed that when copying sub wikis (i.e. creating one subwiki from another one marked as template) will create the pages in the new wiki with authors from the original wiki. This will cause problems as the (local) users from the template wiki have no rights in the newly created wiki.
Even more, if the original template wiki is deleted, these pages will have non-existing authors. This might have created error messages like the ones described above.

To make sure that all references to users from a deleted sub wiki are removed (by converting them to local user references) I have written a snippet:

Replace page authors from another subwiki

You need to type in the name of the deleted sub wiki in the code of the snippet and then you can first check if such references exist and decide to repair them. I hope this is useful in your case.

Aside of that I have observed that in XWiki version 13.10.3 deleting a sub wiki creates an error message at the beginning of the creation process when creating a new wiki. This error does no longer happen if one restarts the wiki after the deletion.
I have not been able to track down the source of the problem; however with XWiki 14.6 it is no longer reproducible.

In any case none of these errors should endanger the stability of the wiki server as a whole. These are only errors when accessing no longer existing data in some circumstances, which creates these spurious error messages.

1 Like