jdyer1 commented on code in PR #2259: URL: https://github.com/apache/solr/pull/2259#discussion_r1514615289
########## solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrJdkClient.java: ########## @@ -287,6 +278,64 @@ private HttpResponse<InputStream> doPutOrPost( return response; } + private volatile boolean headRequested; + private volatile boolean headSucceeded; Review Comment: The issue with doing it just once is it cannot guarantee the client will behave the same every time. If we try once with the first request, we are at the mercy of luck as to whether or not it could fail for some unrelated reason. Then the client is downgraded to Http/1.1 for its lifetime (which could be the life of the application). I can see future bug reports along the lines of "sometimes, after application restart, my solr client downgrades to Http/1.1 for an unknown reason and then I have to restart again to fix it." I think the main use-case for chunked body POST requests are index updates, and most users would batch these, so the cost of an additional HEAD request might be negligible? Maybe I am missing something here, perhaps there is a better way to ensure consistency without adding (much) cost? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org