mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Feature/search 1654 (#463)
* added abstract getShardByTransaction method to ShardRegistry class. * [ SEARCH-1654 ] Change on ShardRegistry interface * [ SEARCH-1654 ] Javadoc + use interfaces on ShardRegistry interface * Added explicitShardId field to node * [SEARCH-1654] added coreName to nodeParameters * [SEARCH-1654] set explicitShardId in returned node * [SEARCH-1654] check if commitTimeMs is null * [SEARCH-1654] Included tnxCommitTimeMs in node result * [SEARCH-1654] getShardInstanceByTransactionTimestamp return optional value * [SEARCH-1654] bug fix in get explicit shard id * [SEARCH-1654] fix incorrect query in ibatis. * [SEARCH-1654] set explicitShardId as Integer
This commit is contained in:
@@ -36,6 +36,7 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.zip.CRC32;
|
||||
@@ -46,6 +47,7 @@ import org.alfresco.repo.dictionary.DictionaryDAO;
|
||||
import org.alfresco.repo.domain.node.Node;
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.domain.node.NodeDAO.ChildAssocRefQueryCallback;
|
||||
import org.alfresco.repo.domain.node.NodeEntity;
|
||||
import org.alfresco.repo.domain.permissions.AclDAO;
|
||||
import org.alfresco.repo.domain.qname.QNameDAO;
|
||||
import org.alfresco.repo.domain.solr.SOLRDAO;
|
||||
@@ -375,6 +377,15 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent
|
||||
|
||||
for (Node node : nodes)
|
||||
{
|
||||
if (shardRegistry != null){
|
||||
shardRegistry.getShardInstanceByTransactionTimestamp(
|
||||
nodeParameters.getCoreName(),
|
||||
node.getTransaction().getCommitTimeMs()).ifPresent(
|
||||
shardId -> ((NodeEntity) node).setExplicitShardId(shardId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
callback.handleNode(node);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user