dsmiley commented on code in PR #2276:
URL: https://github.com/apache/solr/pull/2276#discussion_r1545293836


##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -1828,13 +1823,17 @@ private int fetchPackets(FastInputStream fis) throws 
Exception {
             throw new ReplicationHandlerException("User aborted replication");
           }
           long checkSumServer = -1;
+
           fis.readFully(intbytes);
+
           // read the size of the packet
           int packetSize = readInt(intbytes);
           if (packetSize <= 0) {
-            log.warn("No content received for file: {}", fileName);
+            fis.read(); // read till end-of-file

Review Comment:
   This line does not do what the comment says.  Regardless, shouldn't we 
*already* be at EOF?



##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -1984,7 +1982,7 @@ private FastInputStream getStream() throws IOException {
         QueryRequest req = new QueryRequest(params);
         req.setResponseParser(new InputStreamResponseParser(FILE_STREAM));
         req.setBasePath(leaderBaseUrl);
-        if (useExternalCompression) req.addHeader("Accept-Encoding", "gzip, 
deflate");
+        if (useExternalCompression) req.addHeader("Accept-Encoding", "gzip");

Review Comment:
   why?



##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -1867,7 +1866,6 @@ private int fetchPackets(FastInputStream fis) throws 
Exception {
           log.debug("Fetched and wrote {} bytes of file: {}", bytesDownloaded, 
fileName);
           // errorCount is always set to zero after a successful packet
           errorCount = 0;
-          if (bytesDownloaded >= size) return 0;

Review Comment:
   why this change?



##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -2111,7 +2109,6 @@ NamedList<Object> getDetails() throws IOException, 
SolrServerException {
 
     QueryRequest request = new QueryRequest(params);
     request.setBasePath(leaderBaseUrl);
-    if (useExternalCompression) request.addHeader("Accept-Encoding", "gzip, 
deflate");

Review Comment:
   why?  I suspect temporary for your debugging



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