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/07/11 21:29:10 UTC
[lucene-solr] branch reference_impl updated: #74 Tweaking on
distrib updates.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl by this push:
new efe04ea #74 Tweaking on distrib updates.
efe04ea is described below
commit efe04eab26d62b71f6af220e76542c64af602d29
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Sat Jul 11 16:28:52 2020 -0500
#74 Tweaking on distrib updates.
---
.../org/apache/solr/update/SolrCmdDistributor.java | 25 ++++++++++++----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
index 7f359b1..f004262 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
@@ -262,18 +262,21 @@ public class SolrCmdDistributor implements Closeable {
addCommit(uReq, cmd);
submit(new Req(cmd, node, uReq, false), true);
}
- // wait for any async commits to complete
- while (pending != null && pending.size() > 0) {
- Future<Object> future = null;
- try {
- future = completionService.take();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- log.error("blockAndDoRetries interrupted", e);
- return;
+ if (cmd.waitSearcher) {
+ // only if wait for searcher?.,l
+ // wait for any async commits to complete
+ while (pending != null && pending.size() > 0) {
+ Future<Object> future = null;
+ try {
+ future = completionService.take();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ log.error("blockAndDoRetries interrupted", e);
+ return;
+ }
+ if (future == null) return;
+ pending.remove(future);
}
- if (future == null) return;
- pending.remove(future);
}
}