dsmiley commented on code in PR #2276: URL: https://github.com/apache/solr/pull/2276#discussion_r1575042664
########## solr/core/src/java/org/apache/solr/handler/IndexFetcher.java: ########## @@ -1833,18 +1819,24 @@ private int fetchPackets(FastInputStream fis) throws Exception { byte[] longbytes = new byte[8]; try { while (true) { + if (fis.peek() == -1) { + if (bytesDownloaded == 0) { + log.warn("No content received for file: {}", fileName); + } + return NO_CONTENT; + } if (stop) { stop = false; aborted = true; 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); - return NO_CONTENT; Review Comment: at least an assert (or comment) communicating this is unexpected -- 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