diff --git a/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java b/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java index a136b4e1c5..928d46ecdc 100644 --- a/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java +++ b/src/main/java/org/alfresco/repo/index/shard/ShardRegistry.java @@ -69,17 +69,17 @@ public interface ShardRegistry /** * Returns the property used for EXPLICIT_ID Sharding methods if exists. Null otherwise. * - * @param coreName is the name of the SOLR core: alfresco, archive + * @param storeRef is the name of the SOLR storeRef: workspace://spaceStore, archive://spaceStore * @return QName of the property used for EXPLICIT_ID Sharding methods or null. */ - QName getExplicitIdProperty(String coreName); + QName getExplicitIdProperty(String storeRef); /** * Returns the list with the numbers of the registered Shard Instances. * - * @param coreName is the name of the SOLR core: alfresco, archive + * @param storeRef is the name of the SOLR storeRef: workspace://spaceStore, archive://spaceStore * @return Ordered list of numbers of the registered Shard Instances */ - Set getShardInstanceList(String coreName); + Set getShardInstanceList(String storeRef); } diff --git a/src/main/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java b/src/main/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java index 84701bef66..cf6b184abe 100644 --- a/src/main/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java +++ b/src/main/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java @@ -74,6 +74,7 @@ import org.alfresco.service.cmr.repository.NodeRef.Status; import org.alfresco.service.cmr.repository.Path; import org.alfresco.service.cmr.repository.Path.ChildAssocElement; +import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter; import org.alfresco.service.cmr.security.OwnableService; import org.alfresco.service.cmr.security.PermissionService; @@ -398,7 +399,7 @@ public void getNodes(NodeParameters nodeParameters, NodeQueryCallback callback) { if (shardRegistry != null){ shardRegistry.getShardInstanceByTransactionTimestamp( - nodeParameters.getCoreName(), + new StoreRef(nodeParameters.getStoreProtocol(), nodeParameters.getStoreIdentifier()).toString(), node.getTransaction().getCommitTimeMs()).ifPresent( shardId -> ((NodeEntity) node).setExplicitShardId(shardId));