jdyer1 commented on code in PR #2259:
URL: https://github.com/apache/solr/pull/2259#discussion_r1511966490

##########
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:
   By "every time" I mean with every POST request that meets the criteria.  
(chunked body; no TLS; not forcing Http/1.1).  This generally will mean every 
Solr Update will incur both an Http HEAD and an Http POST.  This should be no 
different if the JDK Client behaved as the Jetty maintainers think it should:  
to incur both an Empty Upgrade then the Actual Request.  It is true most of the 
time the Http HEAD request is unnecessary.  However, I do not know how we know 
_when_ it is unnecessary.  So at the expense of performance, we get it to work 
correctly on a consistent basis.  
   
   Maybe for a Version Two, we could get into retry logic, where if it fails, 
then try a HEAD request and then try the POST once again.  But the more I think 
about what it would take to do this right the less motivated I feel to go down 
this path.



-- 
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

Reply via email to