praste commented on a change in pull request #1306: SOLR-14299: IndexFetcher doesnt' reset count to 0 after the last packet is received URL: https://github.com/apache/lucene-solr/pull/1306#discussion_r386591132
########## File path: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java ########## @@ -1728,20 +1728,21 @@ private int fetchPackets(FastInputStream fis) throws Exception { long checkSumClient = checksum.getValue(); if (checkSumClient != checkSumServer) { log.error("Checksum not matched between client and server for file: {}", fileName); - //if checksum is wrong it is a problem return for retry + //if checksum is wrong it is a problem return (there doesn't seem to be a retry in this case.) return 1; } } //if everything is fine, write down the packet to the file file.write(buf, packetSize); bytesDownloaded += packetSize; log.debug("Fetched and wrote {} bytes of file: {}", bytesDownloaded, fileName); - if (bytesDownloaded >= size) - return 0; //errorCount is always set to zero after a successful packet errorCount = 0; + if (bytesDownloaded >= size) + return 0; } } catch (ReplicationHandlerException e) { + log.warn("Aborting index replication", e); Review comment: agreed. Logging here is not needed. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org