From 2ffbea51182c0f67021f85fc5980d18c15aacf68 Mon Sep 17 00:00:00 2001 From: Andrew Hind Date: Mon, 13 Oct 2014 20:52:27 +0000 Subject: [PATCH] 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 --- .../java/org/alfresco/solr/client/Node.java | 37 ++++++++++++++++++- .../alfresco/solr/client/SOLRAPIClient.java | 10 +++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/Node.java b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/Node.java index a09965a40..030992a70 100644 --- a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/Node.java +++ b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/Node.java @@ -29,6 +29,9 @@ public class Node private String nodeRef; private long txnId; private SolrApiNodeStatus status; + private String tenant; + private long aclId; + public long getId() { return id; @@ -61,9 +64,41 @@ public class Node { this.status = status; } + /** + * @return the tenant + */ + public String getTenant() + { + return tenant; + } + /** + * @param tenant the tenant to set + */ + public void setTenant(String tenant) + { + this.tenant = tenant; + } + /** + * @return the aclId + */ + public long getAclId() + { + return aclId; + } + /** + * @param aclId the aclId to set + */ + public void setAclId(long aclId) + { + this.aclId = aclId; + } + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ @Override public String toString() { - return "NodeInfo [id=" + id + ", txnId=" + txnId + ", status=" + status + "]"; + return "Node [id=" + id + ", nodeRef=" + nodeRef + ", txnId=" + txnId + ", status=" + status + ", tenant=" + tenant + ", aclId=" + aclId + "]"; } + } diff --git a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java index 13f6df6e7..00d98c3c1 100644 --- a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java +++ b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java @@ -588,6 +588,16 @@ public class SOLRAPIClient { nodeInfo.setTxnId(jsonNodeInfo.getLong("txnId")); } + + if(jsonNodeInfo.has("aclId")) + { + nodeInfo.setAclId(jsonNodeInfo.getLong("aclId")); + } + + if(jsonNodeInfo.has("tenant")) + { + nodeInfo.setTenant(jsonNodeInfo.getString("tenant")); + } if(jsonNodeInfo.has("status")) {