[ https://issues.apache.org/jira/browse/SOLR-11708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16273044#comment-16273044 ]
Joel Bernstein commented on SOLR-11708: --------------------------------------- I see the problem in your code I believe. You need to explicitly close the SolrClientCache to exit your program. This should cause your program to exit immediately. > Streaming SolrJ clients hang for 50 seconds when closing the stream > ------------------------------------------------------------------- > > Key: SOLR-11708 > URL: https://issues.apache.org/jira/browse/SOLR-11708 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 7.0, 7.1, 6.6.2 > Reporter: Erick Erickson > Attachments: Main.java > > > I'll attach my client program in a second but the gist is that closing a > CloudSolrStream hangs the client for about 50 seconds no matter how it's > closed. > Setup: > - Create a 2-shard, leader-only collection > - Index a million documents to it > - run the attached program. > At the end you'll see the message printed out "We finally stopped", but the > program hands for roughly 50 seconds before exiting. > The hang happens with all these situations: > - read to EOF tuple > - stop part way through > - close in a finally block > - close with try-with-resources > In the early-termination case, I do see the following (expected) error in > solr's log: > ERROR - 2017-11-30 16:18:20.024; [c:eoe s:shard2 r:core_node4 > x:eoe_shard2_replica_n2] org.apache.solr.common.SolrException; null:Early > Client Disconnect > I see the same behavior in 7.0 > The claim is this worked in earlier 7x versions, 7.0 in particular. I'll test > that shortly and report results. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org