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

Possible breakage if XWiki is stopped while R1100000XWIKI15620DataMigration is processing

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      I am upgrading an XWiki instance to 11.10.5.

      Just after having installed the new XWiki package with debian, I restart Tomcat, so during R1100000XWIKI15620DataMigration is processing.

      Then, when I try to reach the wiki, I get an error saying R1100000XWIKI15620DataMigration has failed.

      Root cause:

      org.apache.commons.io.FileExistsException: Destination '/var/lib/xwiki/data/store/file/xwiki' already exists
      	org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2923)
      	org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.migrateWiki(R1100000XWIKI15620DataMigration.java:123)
      	org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.hibernateMigrate(R1100000XWIKI15620DataMigration.java:92)
      	com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:118)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:837)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.migrateDatabase(AbstractDataMigrationManager.java:736)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:657)
      	com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:361)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsOnlyOnce(AbstractDataMigrationManager.java:637)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.tryToProcceedToMigration(AbstractDataMigrationManager.java:614)
      	com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:539)
      	com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:658)
      	com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:619)
      	com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:796)
      	com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
      	com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:870)
      	com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:363)
      	com.xpn.xwiki.XWiki.getDocument(XWiki.java:2116)
      	com.xpn.xwiki.XWiki.getDocument(XWiki.java:2178)
      	com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1399)
      	com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1366)
      	com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1271)
      	com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1208)
      	com.xpn.xwiki.XWiki.<init>(XWiki.java:1181)
      	com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
      	org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:240)
      	org.xwiki.job.AbstractJob.run(AbstractJob.java:217)
      	java.lang.Thread.run(Thread.java:748)
      

      My theory is that the directory /var/lib/xwiki/data/store/file/xwiki is created at the beginning of the migration, and when the migration is re-applied, it failed because it sees that /var/lib/xwiki/data/store/file/xwiki exists.
      In other words: the migration seems to not be able to resume when stopped in the middle.

      At this point it is only a theory, I would like tmortagne to confirm when he can.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              gdelhumeau Guillaume Delhumeau
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: