You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/10/01 07:36:25 UTC
[lucene-solr] 05/06: @879 More cleanup attempts.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 8544c9dad2adda7b8cf64828595f000403539240
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Thu Oct 1 00:24:40 2020 -0500
@879 More cleanup attempts.
---
.../java/org/apache/solr/handler/component/HttpShardHandler.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
index e3d8365..bbc9d41 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
@@ -238,19 +238,24 @@ public class HttpShardHandler extends ShardHandler {
responseCancellableMap.remove(rsp);
pending.decrementAndGet();
- if (bailOnError && rsp.getException() != null) return rsp; // if exception, return immediately
+ if (bailOnError && rsp.getException() != null) {
+ responseCancellableMap.clear();
+ return rsp; // if exception, return immediately
+ }
// add response to the response list... we do this after the take() and
// not after the completion of "call" so we know when the last response
// for a request was received. Otherwise we might return the same
// request more than once.
rsp.getShardRequest().responses.add(rsp);
if (rsp.getShardRequest().responses.size() == rsp.getShardRequest().actualShards.length) {
+ responseCancellableMap.clear();
return rsp;
}
}
} catch (InterruptedException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
}
+ responseCancellableMap.clear();
return null;
}