mirror of https://github.com/apache/lucene.git
SOLR-11920: Adding a file exists check before skipping a file for replication
This commit is contained in:
parent
a417a2cd6a
commit
72ee0f64d4
|
@ -1037,8 +1037,9 @@ public class IndexFetcher {
|
|||
boolean alwaysDownload = filesToAlwaysDownloadIfNoChecksums(filename, size, compareResult);
|
||||
LOG.debug("Downloading file={} size={} checksum={} alwaysDownload={}", filename, size, file.get(CHECKSUM), alwaysDownload);
|
||||
if (!compareResult.equal || downloadCompleteIndex || alwaysDownload) {
|
||||
if (downloadCompleteIndex && doDifferentialCopy && compareResult.equal && compareResult.checkSummed) {
|
||||
File localFile = new File(indexDirPath, filename);
|
||||
File localFile = new File(indexDirPath, filename);
|
||||
if (downloadCompleteIndex && doDifferentialCopy && compareResult.equal && compareResult.checkSummed
|
||||
&& localFile.exists()) {
|
||||
LOG.info("Don't need to download this file. Local file's path is: {}, checksum is: {}",
|
||||
localFile.getAbsolutePath(), file.get(CHECKSUM));
|
||||
// A hard link here should survive the eventual directory move, and should be more space efficient as
|
||||
|
|
Loading…
Reference in New Issue