[jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15069681#comment-15069681 ] Mark Miller commented on SOLR-8451: --- Okay, I dug into this a bit. Actually, we should not call abort at all. Right now, since we call it after close, it's harmless though. Also, ConcurrentUpdateSolrClient very oddly seem to always not read that last 40 or 44 bytes of the server response even on successful requests. That's odd, but should not mess with connection reuse. We only have to ensure we close the content stream, not read it all. > We should be calling method.abort before response.close in HttpSolrClient > - > > Key: SOLR-8451 > URL: https://issues.apache.org/jira/browse/SOLR-8451 > Project: Solr > Issue Type: Bug >Reporter: Mark Miller > -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15069018#comment-15069018 ] Mark Miller commented on SOLR-8451: --- I'm evolving this patch in SOLR-8453. Quote from that issue: bq. I think we overdo method.abort and I think it messes up connection reuse. On a clean server->client exception, we should simply make sure the response entity content is fully consumed and closed like a normal request. > We should be calling method.abort before response.close in HttpSolrClient > - > > Key: SOLR-8451 > URL: https://issues.apache.org/jira/browse/SOLR-8451 > Project: Solr > Issue Type: Bug >Reporter: Mark Miller > -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15066746#comment-15066746 ] Mark Miller commented on SOLR-8451: --- "I moved the method abort call out of 'shouldClose' - it doesn't seem like it should be tied up in that. I also made it first. I was just kind of guessing on that, but it looks like it should be first according to: https://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/client/ClientAbortMethod.java; > We should be calling method.abort before response.close in HttpSolrClient > - > > Key: SOLR-8451 > URL: https://issues.apache.org/jira/browse/SOLR-8451 > Project: Solr > Issue Type: Bug >Reporter: Mark Miller > -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15066748#comment-15066748 ] Mark Miller commented on SOLR-8451: --- {noformat} Index: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java === --- solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java (revision 1720969) +++ solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java (working copy) @@ -589,14 +589,16 @@ throw new SolrServerException( "IOException occured when talking to server at: " + getBaseURL(), e); } finally { - if (respBody != null && shouldClose) { -try { - respBody.close(); -} catch (IOException e) { - log.error("", e); -} finally { - if (!success) { -method.abort(); + try { +if (!success) { + method.abort(); +} + } finally { +if (respBody != null && shouldClose) { + try { +respBody.close(); + } catch (IOException e) { +log.error("", e); } } } {noformat} > We should be calling method.abort before response.close in HttpSolrClient > - > > Key: SOLR-8451 > URL: https://issues.apache.org/jira/browse/SOLR-8451 > Project: Solr > Issue Type: Bug >Reporter: Mark Miller > -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15066733#comment-15066733 ] Mark Miller commented on SOLR-8451: --- See https://issues.apache.org/jira/browse/SOLR-7339?focusedCommentId=15066701=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15066701 and https://issues.apache.org/jira/browse/SOLR-7339?focusedCommentId=15066716=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15066716 > We should be calling method.abort before response.close in HttpSolrClient > - > > Key: SOLR-8451 > URL: https://issues.apache.org/jira/browse/SOLR-8451 > Project: Solr > Issue Type: Bug >Reporter: Mark Miller > -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org