From e71c97ce6cb9ee24eab98dd031ba91f4924a88c8 Mon Sep 17 00:00:00 2001 From: agazzarini Date: Fri, 26 Jul 2019 18:37:50 +0200 Subject: [PATCH] [ SEARCH-1717 ] Javadoc + logging (WARN level) for LRIS and EXPLICIT_ID+LRIS router --- .../alfresco/solr/tracker/DocRouterFactory.java | 4 ++-- .../ExplicitShardIdWithStaticPropertyRouter.java | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/DocRouterFactory.java b/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/DocRouterFactory.java index 1399a6316..6ce926dbe 100644 --- a/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/DocRouterFactory.java +++ b/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/DocRouterFactory.java @@ -62,10 +62,10 @@ public class DocRouterFactory LOGGER.info("Sharding via PROPERTY"); return new PropertyRouter(properties.getProperty("shard.regex", "")); 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()); diff --git a/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/ExplicitShardIdWithStaticPropertyRouter.java b/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/ExplicitShardIdWithStaticPropertyRouter.java index 62e847029..d811809c1 100644 --- a/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/ExplicitShardIdWithStaticPropertyRouter.java +++ b/search-services/alfresco-search/src/main/java/org/alfresco/solr/tracker/ExplicitShardIdWithStaticPropertyRouter.java @@ -24,11 +24,25 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * 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. * + *


+ * WARNING: This {@link DocRouter} is part of an early access/preview routing feature called + * Last-Registered-Indexing-Shard (LRIS), where the {@link Node#getExplicitShardId()} is filled with the identifier of + * the last Master Shard which subscribed the cluster. + * + *

+ *

+ * + * 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 {