Merge branch 'fix/SEARCH_1717' into 'master'

[ SEARCH-1717 ] Javadoc + logging (WARN level) for LRIS and EXPLICIT_ID+LRIS router

See merge request search_discovery/insightengine!110
This commit is contained in:
Andrea Gazzarini
2019-07-29 14:48:35 +01:00
2 changed files with 27 additions and 3 deletions
@@ -65,10 +65,10 @@ public class DocRouterFactory
LOGGER.info("Sharding via PROPERTY");
return new PropertyRouter(properties.getProperty(SHARD_REGEX_KEY, ""));
case LAST_REGISTERED_INDEXING_SHARD:
LOGGER.info("Sharding via LAST_REGISTERED_INDEXING_SHARD");
LOGGER.warn("Sharding via LAST_REGISTERED_INDEXING_SHARD: Note this is available at the moment as an Early Access/preview feature!");
return new ExplicitShardIdWithStaticPropertyRouter();
case EXPLICIT_ID_FALLBACK_LRIS:
LOGGER.info("Sharding via EXPLICIT_ID_FALLBACK_LRIS");
LOGGER.warn("Sharding via EXPLICIT_ID_FALLBACK_LRIS: Note the LRIS Router (which is part of this composite router) is available at the moment as an Early Access/preview feature!");
return new DocRouterWithFallback(
new ExplicitShardIdWithDynamicPropertyRouter(false),
new ExplicitShardIdWithStaticPropertyRouter());
@@ -22,11 +22,35 @@ import org.alfresco.solr.client.Acl;
import org.alfresco.solr.client.Node;
/**
* Routes the incoming nodes (not ACLs!) on the last registered indexing shard (LRIS).
* Routes the incoming nodes (not ACLs!) on the shard explicitly indicated in {@link Node#getExplicitShardId()} method.
* The access control information is duplicated in each shard.
*
* <p><br/>
* WARNING: This is an experimental feature that is subject to change.
* The current known issues are:
*
* <ul>
* <li>Incompatibility with the "Purge" action on the Alfresco Admin Console</li>
* <li>Incompatibility with the "Purge on Startup" option on the Alfresco Admin Console</li>
* </ul>
*
* As a result, when this router is used and the purge action is invoked you may experience a wrong shard subscription
* registration order. That would cause a wrong distribution of the indexed data across the cluster.
*
* Note the "Purge on restart" option on the Admin Console is checked by default, so before building a
* Solr cluster which uses this router, please make sure the check has been disabled.
*
* </b><br/><br/>
* </p>
*
* Specifically, until the whole feature will be officially released, the LRIS document routing feature is not compatible
* with the "Purge" action on the Alfresco Admin Console.
* Note that at time of writing, the "Purge on startup" option in the Admin Console is enabled by default so prior to
* build your search cluster, you have to make sure that option is unchecked.
*
* @author Elia
* @author agazzarini
* @since 1.4
*/
public class ExplicitShardIdWithStaticPropertyRouter extends ComposableDocRouter
{