Skip to content

Commit

Permalink
#74 Tweaking on distrib updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrmiller committed Jul 11, 2020
1 parent 172e276 commit efe04ea
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,21 @@ public void distribCommit(CommitUpdateCommand cmd, List<Node> nodes,
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);
}

}
Expand Down

0 comments on commit efe04ea

Please sign in to comment.