[ SEARCH-2090 ] Delete node only if that exists (SEARCH-2096)

This commit is contained in:
agazzarini
2020-03-10 13:56:44 +01:00
parent 09326641f2
commit a5fadf92ff
@@ -2297,16 +2297,23 @@ public class SolrInformationServer implements InformationServer
private void deleteErrorNode(UpdateRequestProcessor processor, SolrQueryRequest request, Node node) throws IOException
{
DeleteUpdateCommand delErrorDocCmd = new DeleteUpdateCommand(request);
delErrorDocCmd.setId(PREFIX_ERROR + node.getId());
processor.processDelete(delErrorDocCmd);
String errorDocId = PREFIX_ERROR + node.getId();
if (getDocListSize(FIELD_SOLR4_ID + ":" + errorDocId) > 0)
{
DeleteUpdateCommand delErrorDocCmd = new DeleteUpdateCommand(request);
delErrorDocCmd.setId(errorDocId);
processor.processDelete(delErrorDocCmd);
}
}
private void deleteNode(UpdateRequestProcessor processor, SolrQueryRequest request, long dbid) throws IOException
{
DeleteUpdateCommand delDocCmd = new DeleteUpdateCommand(request);
delDocCmd.setQuery(FIELD_DBID + ":" + dbid);
processor.processDelete(delDocCmd);
if (getDocListSize(FIELD_DBID + ":" + dbid) > 0)
{
DeleteUpdateCommand delDocCmd = new DeleteUpdateCommand(request);
delDocCmd.setQuery(FIELD_DBID + ":" + dbid);
processor.processDelete(delDocCmd);
}
}
private void deleteNode(UpdateRequestProcessor processor, SolrQueryRequest request, Node node) throws IOException