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

Automatically recreate Solr index when needed during upgrade

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4.4
    • Fix Version/s: 11.8-rc-1
    • Component/s: Search - Solr
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      To reproduce:

      • Download xwiki-enterprise-jetty-hsqldb-7.0.1.zip and unzip. Start XWiki and access the home page. Stop.
      • Download xwiki-enterprise-jetty-hsqldb-7.4.4.zip and unzip
      • Delete xwiki-enterprise-jetty-hsqldb-7.4.4/data and replace it with the data dir from xwiki-enterprise-jetty-hsqldb-7.0.1
      • Restart and access the home

      You should see the following in the console:

      2016-08-19 09:48:30.743:INFO:oxtjl.NotifyListener:main: ----------------------------------
      2016-08-19 09:48:30.744:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://localhost:8080/ in your browser to access your wiki.
      2016-08-19 09:48:30.744:INFO:oxtjl.NotifyListener:main: ----------------------------------
      2016-08-19 09:48:37,592 [XWiki initialization] INFO  .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled 
      2016-08-19 09:48:37,810 [XWiki initialization] INFO  .HibernateDataMigrationManager - The following data migration(s) will be applied for wiki [xwiki] currently in version [70000]: 
      2016-08-19 09:48:37,811 [XWiki initialization] INFO  .HibernateDataMigrationManager -   R72000XWIKI12153 - Convert document space name into space reference 
      2016-08-19 09:48:37,811 [XWiki initialization] INFO  .HibernateDataMigrationManager -   R72001XWIKI12228 - Make sure xwikidocument and xwikispace tables are in sync 
      2016-08-19 09:48:37,811 [XWiki initialization] INFO  .HibernateDataMigrationManager -   R73000XWIKI12277 - Migrate TemplateProviderClass' removed 'type' property values to the new 'terminal' property. 
      2016-08-19 09:48:37,811 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 
      2016-08-19 09:48:38,004 [XWiki initialization] INFO  .HibernateDataMigrationManager - Starting data migration [R72000XWIKI12153] with version [72000] on database [xwiki] 
      2016-08-19 09:48:38,066 [XWiki initialization] INFO  .HibernateDataMigrationManager - Data migration [R72000XWIKI12153] applied successfully, database [xwiki] upgraded to version [72000] 
      2016-08-19 09:48:38,066 [XWiki initialization] INFO  .HibernateDataMigrationManager - Starting data migration [R72001XWIKI12228] with version [72001] on database [xwiki] 
      2016-08-19 09:48:38,117 [XWiki initialization] INFO  .HibernateDataMigrationManager - Data migration [R72001XWIKI12228] applied successfully, database [xwiki] upgraded to version [72001] 
      2016-08-19 09:48:38,117 [XWiki initialization] INFO  .HibernateDataMigrationManager - Starting data migration [R73000XWIKI12277] with version [73000] on database [xwiki] 
      2016-08-19 09:48:38,149 [XWiki initialization] INFO  .HibernateDataMigrationManager - Data migration [R73000XWIKI12277] applied successfully, database [xwiki] upgraded to version [73000] 
      2016-08-19 09:48:40,984 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Starting job of type [solr.indexer] with identifier [[solr, indexer]] 
      2016-08-19 09:48:42,049 [XWiki Solr index job thread] ERROR o.x.s.s.i.j.IndexerJob         - Exception thrown during job execution 
      java.lang.IllegalArgumentException: The resolver parameter doesn't contain an Entity Reference of type [SPACE]
      	at org.xwiki.model.internal.reference.ExplicitReferenceEntityReferenceResolver.getDefaultReference(ExplicitReferenceEntityReferenceResolver.java:45) ~[xwiki-platform-model-7.4.4.jar:7.4.4]
      	at org.xwiki.model.internal.reference.AbstractEntityReferenceResolver.resolveDefaultReference(AbstractEntityReferenceResolver.java:77) ~[xwiki-platform-model-7.4.4.jar:7.4.4]
      	at org.xwiki.model.internal.reference.AbstractReferenceEntityReferenceResolver.resolve(AbstractReferenceEntityReferenceResolver.java:67) ~[xwiki-platform-model-7.4.4.jar:7.4.4]
      	at org.xwiki.model.internal.reference.AbstractReferenceEntityReferenceResolver.resolve(AbstractReferenceEntityReferenceResolver.java:41) ~[xwiki-platform-model-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver.resolveMissingReference(SolrEntityReferenceResolver.java:175) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver.getSpaceReference(SolrEntityReferenceResolver.java:113) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver.getEntityReference(SolrEntityReferenceResolver.java:73) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver.resolve(SolrEntityReferenceResolver.java:65) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver.resolve(SolrEntityReferenceResolver.java:48) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrDocumentReferenceResolver.resolve(SolrDocumentReferenceResolver.java:48) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.reference.SolrDocumentReferenceResolver.resolve(SolrDocumentReferenceResolver.java:38) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.job.SolrDocumentIterator.next(SolrDocumentIterator.java:99) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.job.SolrDocumentIterator.next(SolrDocumentIterator.java:54) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.job.DiffDocumentIterator.next(DiffDocumentIterator.java:120) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.job.IndexerJob.updateSolrIndex(IndexerJob.java:113) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.search.solr.internal.job.IndexerJob.runInternal(IndexerJob.java:94) ~[xwiki-platform-search-solr-api-7.4.4.jar:7.4.4]
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:205) [xwiki-commons-job-7.4.4.jar:7.4.4]
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:188) [xwiki-commons-job-7.4.4.jar:7.4.4]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_73]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_73]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]
      2016-08-19 09:48:42,050 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Finished job of type [solr.indexer] with identifier [[solr, indexer]] 
      

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: