Skip to content

Commit

Permalink
KYLO-3093: run reindex with the right permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
harschware committed Nov 29, 2018
1 parent d5861cb commit 3ff32e2
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class CatalogMetadataConfig {

private static final Logger log = LoggerFactory.getLogger(CatalogMetadataConfig.class);


@Bean
public ConnectorProvider connectorProvider() {
return new JcrConnectorProvider();
Expand All @@ -76,7 +75,7 @@ public PostMetadataConfigAction connectorPluginSyncAction(ConnectorPluginManager
doPluginSyncAction(pluginMgr, metadata);
} catch (ConnectorAlreadyExistsException e) {
log.warn("Encountered an error attempting to synchronize plugins", e);
log.info("Rebuilding modeshape indexes to ensure the are accurately synchronized with the data. Please be patient as this may take a long time!");
log.info("Rebuilding modeshape indexes to ensure they are accurately synchronized with the data. Please be patient as this may take a long time!");

try {
reindex(metadata);
Expand All @@ -90,13 +89,12 @@ public PostMetadataConfigAction connectorPluginSyncAction(ConnectorPluginManager
}



private void reindex(MetadataAccess metadata) {
metadata.commit(() -> {
Session session = JcrMetadataAccess.getActiveSession();
Workspace workspace = (Workspace) session.getWorkspace();
workspace.reindex();
});
}, MetadataAccess.SERVICE);
}


Expand Down

0 comments on commit 3ff32e2

Please sign in to comment.