Skip to content

Apache Lucene open-source search software

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

Pushkar Raste17c576a36f74
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e9df9b13317..1d213c8472f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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
---------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index 0f873af9c81..842c40615cb 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -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;