-
Bug
-
Resolution: Workaround exists
-
Minor
-
None
-
5.7
-
None
-
None
Steps to reproduce
- Upgrade from 5.4.x to 5.7.x directly by using script from https://git.magnolia-cms.com/users/fgrilli/repos/update-magnolia/browse
- The log will be flooded with warning from the IndexingConfigurationImpl
2018-07-25 17:48:33,325 INFO info.magnolia.jackrabbit.lucene.SearchIndex : Workspace specific indexing configuration {/info/magnolia/jackrabbit/indexing_configuration_keystore.xml} was not found. Will use {/info/magnolia/jackrabbit/indexing_configuration_default.xml} instead. 2018-07-25 17:48:33,549 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-contacts-nodetypes.xml 2018-07-25 17:48:33,551 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-google-sitemap-nodetypes.xml 2018-07-25 17:48:33,553 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-rssaggregator-nodetypes.xml 2018-07-25 17:48:33,555 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-category-nodetypes.xml 2018-07-25 17:48:33,557 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-tour-nodetypes.xml 2018-07-25 17:48:33,675 INFO ia.setup.nodetype.AbstractNodeTypeRegistrationTask: Unregistered the following NodeTypes '[mgnl:asset, mgnl:content, mgnl:item, mgnl:role, mgnl:user, mgnl:group, mgnl:systemMessage, mgnl:rssAggregator, mgnl:page, mgnl:category, mgnl:siteMap, mgnl:contact, mgnl:deleted, mgnl:versionable]'. 2018-07-25 17:48:33,676 INFO ia.setup.nodetype.AbstractNodeTypeRegistrationTask: In order to unregister 'mgnl:versionable', the following depending node types have been unregistered first: [mgnl:asset, mgnl:content, mgnl:item, mgnl:role, mgnl:user, mgnl:group, mgnl:systemMessage, mgnl:rssAggregator, mgnl:page, mgnl:category, mgnl:siteMap, mgnl:contact, mgnl:deleted]. 2018-07-25 17:48:33,676 INFO ia.setup.nodetype.AbstractNodeTypeRegistrationTask: Registering 'mgnl:versionable' and the following depending nodeTypes: [mgnl:asset, mgnl:content, mgnl:item, mgnl:role, mgnl:user, mgnl:group, mgnl:systemMessage, mgnl:rssAggregator, mgnl:page, mgnl:category, mgnl:siteMap, mgnl:contact, mgnl:deleted] 2018-07-25 17:48:33,691 WARN rabbit.core.query.lucene.IndexingConfigurationImpl: Unable to refresh index rules javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.magnolia.info/jcr/mgnl}page at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getNodeTypeDef(NodeTypeRegistry.java:552) ~[jackrabbit-core-2.16.1.jar:2.16.1]
- The system still work without restarting. Warnings will not be showed again after the migration.
Reasons
- After upgraded to Jackrabbit 2.16.1 in the ticket
MAGNOLIA-7285, Jackrabbit will show warnings while refresh indexing rules whenever it can't find a node type definition. Old Jackrabbit version used node type name only, then the issue will not happen. - In CoreModuleVersionHandler we have a task to update Versionable node type came from the ticket
MAGNOLIA-6560 register(DeltaBuilder.update("5.5", "") .addTask(new MigrateVersionWorkspacesToNewStructureTask(repositoryManager)) .addTasks(getLockableMixinAdditionTasksForAllWorkspaces())
- The task AddLockableMixinToVersionableMixinTask will try to un-register "mgnl:versionable" before re-register with new updates. However "mgnl:versionable" is a supertypes of many other node types and "mgnl:page" is one of them. They should be un-registered before "mgnl:versionable" can be re-registered.
- Unfortunately, before "mgnl:page" can be registered, Jackrabbit try to refreshIndexRules with the rules are defined in the indexing_configuration_website.xml file then throws multilines of warning
Hints
- Magnolia SearchIndex is introduced since
MAGNOLIA-7231,MGNLCE-118. We need to use our SearchIndex to fix the fresh installation warning which was handled byMAGNOLIA-7197. - Our migration script for testing will need to update the SearchIndex configuration:
-
#From < 5.5.9 and < 5.6.2 if [[ $MAJOR_VER_FROM -eq 5 && ($MINOR_VER_FROM -lt 5 || (($MINOR_VER_FROM -eq 5) && $FIX_VER_FROM -le 9) || (($MINOR_VER_FROM -eq 6) && $FIX_VER_FROM -le 2) )]] ; then echo 'Updating to Magnolia SearchIndex...' perl -pi -e 's/org.apache.jackrabbit.core.query.lucene.SearchIndex/info.magnolia.jackrabbit.lucene.SearchIndex/g' $TOMCAT_DIR/webapps/magnoliaAuthor/WEB-INF/config/repo-conf/jackrabbit-bundle-derby-search.xml perl -pi -e 's/indexing_configuration.xml/indexing_configuration_\$\{wsp.name\}.xml/g' $TOMCAT_DIR/webapps/magnoliaAuthor/WEB-INF/config/repo-conf/jackrabbit-bundle-derby-search.xml fi
- Node types are independence with workspaces. So that we don't need to loop over all workspaces to update the node type definition CoreModuleVersionHandler#getLockableMixinAdditionTasksForAllWorkspaces
- Find a way to update Versionable node type (add mixin) without un-register bunch of dependent node types
Acceptance criteria
- relates to
-
MAGNOLIA-7197 Startup errors when using Java 9
- Closed
-
DOCU-1636 Known issue on upgrade from 5.4.x to 5.7.x
- Closed
-
MAGNOLIA-7231 Website specific rules for indexing affect indexing performance of all workspaces
- Closed