iverase commented on a change in pull request #2094:
URL: https://github.com/apache/lucene-solr/pull/2094#discussion_r529539404



##########
File path: 
lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyOneFile.java
##########
@@ -96,11 +96,12 @@ public boolean visit() throws IOException {
         // Paranoia: make sure the primary node is not smoking crack, by 
somehow sending us an already corrupted file whose checksum (in its
         // footer) disagrees with reality:
         long actualChecksumIn = in.readLong();
-        if (actualChecksumIn != checksum) {
+        // CheckSum is written in Big Endian so we need to reverse bytes
+        if (actualChecksumIn != Long.reverseBytes(checksum)) {

Review comment:
       yes, just need to make sure we revert bytes when writing the checksum 
again.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to