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

Solr displays a huge stack when trying to index a document from a deleted wiki

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 12.8
    • Fix Version/s: None
    • Component/s: Search - Solr
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      If the Solr index queue contains Document to index that concerns a wiki that have just been deleted we can see some huge stacktraces, such as:

      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 2020-10-20 15:51:15,947 [XWiki Solr index thread] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: -4850, SQLState: 3F000  
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 2020-10-20 15:51:15,947 [XWiki Solr index thread] ERROR o.h.e.j.s.SqlExceptionHelper   - invalid schema name: MYNEWWIKI  
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 2020-10-20 15:51:15,948 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer   - Failed to process entry [INDEX mynewwiki:WikiManager.CommonTranslations(mr)]  
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - org.xwiki.search.solr.internal.api.SolrIndexerException: Failed to get input Solr document for entity 'mynewwiki:WikiManager.CommonTranslations(mr)' 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:140) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:499) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:408) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:376) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at java.lang.Thread.run(Thread.java:748) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - Caused by: com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [mynewwiki:WikiManager.CommonTranslations] 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1106) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2144) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2206) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getDocument(AbstractSolrMetadataExtractor.java:182) 
      2020-10-20 15:51:16,131 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.setDocumentFields(AbstractSolrMetadataExtractor.java:231) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:126) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	... 4 common frames omitted 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database mynewwiki 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:672) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:627) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:805) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:976) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	... 10 common frames omitted 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - Caused by: org.hibernate.exception.GenericJDBCException: error executing work 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:311) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1084) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1071) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.engine.spi.SessionDelegatorBaseImpl.doWork(SessionDelegatorBaseImpl.java:1105) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.executeStatement(HibernateStore.java:915) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:652) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	... 14 common frames omitted 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - Caused by: java.sql.SQLException: invalid schema name: MYNEWWIKI 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at com.xpn.xwiki.internal.store.hibernate.HibernateStore$1.execute(HibernateStore.java:921) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:37) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$1(AbstractSharedSessionContract.java:1068) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:306) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	... 19 common frames omitted 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - Caused by: org.hsqldb.HsqlException: invalid schema name: MYNEWWIKI 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.error.Error.error(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.error.Error.error(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.SchemaManager.getSchemaHsqlName(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.Session.getSchemaHsqlName(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.ParserDQL.readSchemaName(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.ParserCommand.compileSet(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.ParserCommand.compilePart(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.ParserCommand.compileStatements(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.Session.executeDirectStatement(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	at org.hsqldb.Session.execute(Unknown Source) 
      2020-10-20 15:51:16,146 [Exec Stream Pumper] - 	... 27 common frames omitted 
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              surli Simon Urli
              Reporter:
              surli Simon Urli
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: