Fixes for ACE-3077 BM-0013: SOLR GC performance

Fixed content tracker to limit concurrent commits.
    Fixed delete to use "id" - better then delete by query which requires NRT reload
    Fixed TX and Changeset in index detection
        1) only check if it can be in the index based on timestamp
        2) cache that should cover last hour recheck

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@87960 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2014-10-13 20:52:27 +00:00
parent 1f5b674c5f
commit 1c5eb6d44c
2 changed files with 22 additions and 4 deletions

View File

@@ -51,7 +51,9 @@
"id": ${node.id?c},
"nodeRef": "${node.nodeRef}",
"txnId": ${node.txnId?c},
"status": "<#if node.deleted>d<#else>u</#if>"
"status": "<#if node.deleted>d<#else>u</#if>",
"aclId": ${node.aclId?c},
"tenant": "${node.tenant}"
}
</#macro>

View File

@@ -217,13 +217,17 @@ public class NodesGet extends DeclarativeWebScript
private final Long txnId;
private final boolean isDeleted;
private final String nodeRef;
private final String tenant;
private final Long aclId;
public NodeRecord(Node node, QNameDAO qnameDAO)
public NodeRecord(Node node, QNameDAO qnameDAO, TenantService tenantService)
{
this.id = node.getId();
this.txnId = node.getTransaction().getId();
this.isDeleted = node.getNodeStatus(qnameDAO).isDeleted();
this.nodeRef = node.getNodeRef().toString();
this.tenant = tenantService.getDomain(node.getNodeRef().getStoreRef().getIdentifier());
this.aclId = node.getAclId();
}
public Long getId()
@@ -245,6 +249,18 @@ public class NodesGet extends DeclarativeWebScript
{
return nodeRef;
}
public String getTenant()
{
return tenant;
}
public Long getAclId()
{
return aclId;
}
}
/**
@@ -281,12 +297,12 @@ public class NodesGet extends DeclarativeWebScript
StoreRef baseStoreRef = new StoreRef(tenantStoreRef.getProtocol(), tenantService.getBaseName(tenantStoreRef.getIdentifier(), true));
if (storeRef.equals(baseStoreRef))
{
nodes.add(new NodeRecord(node, qnameDAO));
nodes.add(new NodeRecord(node, qnameDAO, tenantService));
}
}
else
{
nodes.add(new NodeRecord(node, qnameDAO));
nodes.add(new NodeRecord(node, qnameDAO, tenantService));
}
// continue - get next node