Fix for ACE-3228 Solr4 - Server 500 errors from Alfresco and Solr constantly tries to retrieve content for missing nodes

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@88908 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2014-10-22 12:07:07 +00:00
parent f63ac4eae7
commit 76bee6ba42

View File

@@ -124,7 +124,10 @@ public class NodeContentGet extends StreamContent
Pair<Long, NodeRef> pair = nodeDAO.getNodePair(nodeId); Pair<Long, NodeRef> pair = nodeDAO.getNodePair(nodeId);
if(pair == null) if(pair == null)
{ {
throw new WebScriptException("Node id does not exist"); // If the node does not exists we treat it as if it has no content
// We could be trying to update the content of a node in the index that has been deleted.
res.setStatus(HttpStatus.SC_NO_CONTENT);
return;
} }
NodeRef nodeRef = pair.getSecond(); NodeRef nodeRef = pair.getSecond();