From 219d5934a4ff8580e1aef691debc374dbe2328e9 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Sat, 16 Nov 2013 08:22:29 +0100 Subject: [PATCH] fixed termination bug in Solr Connector --- .../solr/connector/ConcurrentUpdateSolrConnector.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java index 4d609f736..a1bc1dfe8 100644 --- a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java +++ b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java @@ -96,7 +96,10 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector { updateIdCache((String) doc.getFieldValue(CollectionSchema.id.getSolrFieldName())); for (int i = 0; i < getmore; i++) { SolrInputDocument d = ConcurrentUpdateSolrConnector.this.updateQueue.take(); - if (d == POISON_DOCUMENT) break; + if (d == POISON_DOCUMENT) { + ConcurrentUpdateSolrConnector.this.updateQueue.put(POISON_DOCUMENT); // make sure that the outer loop terminates as well + break; + } docs.add(d); updateIdCache((String) d.getFieldValue(CollectionSchema.id.getSolrFieldName())); }