SOLR-14299 IndexFetcher doesn't reset count to 0 after the last packet is received

This commit is contained in:
Pushkar Raste 2020-02-25 11:37:44 -05:00 committed by Mike Drob
parent e308e53873
commit 17c576a36f
2 changed files with 5 additions and 3 deletions

View File

@ -194,6 +194,8 @@ Bug Fixes
* SOLR-14287: Admin UI Properties screen does not show colons (janhoy)
* SOLR-14299 IndexFetcher doesn't reset error count to 0 after the last packet is received (Pushkar Raste via Mike Drob)
Other Changes
---------------------

View File

@ -1728,7 +1728,7 @@ public class IndexFetcher {
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;
}
}
@ -1736,10 +1736,10 @@ public class IndexFetcher {
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) {
throw e;