CopyOneFile does not handle split checksum
aprudhomme opened this issue · 0 comments
aprudhomme commented
When a replica copies a file, it assumes that the entire 8 byte checksum is in the last chunk. When this is not the case, the result is an ArrayIndexOutOfBoundsException, such as
java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -1 is negative at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:129) at org.apache.lucene.store.OutputStreamIndexOutput.writeBytes(OutputStreamIndexOutput.java:53) at org.apache.lucene.replicator.nrt.CopyOneFile.visit(CopyOneFile.java:116) at com.yelp.nrtsearch.server.luceneserver.SimpleCopyJob.visit(SimpleCopyJob.java:234) at com.yelp.nrtsearch.server.luceneserver.Jobs.run(Jobs.java:80)
We should add handling for this corner case.