SOLR-8077: Replication can still cause index corruption.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1704840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2015-09-23 12:56:15 +00:00
parent bd464ee9ed
commit dfe7af145f
2 changed files with 7 additions and 2 deletions

View File

@ -213,6 +213,8 @@ Bug Fixes
* SOLR-8069: Ensure that only the valid ZooKeeper registered leader can put a replica into Leader
Initiated Recovery. (Mark Miller, Jessica Cheng, Anshum Gupta)
* SOLR-8077: Replication can still cause index corruption. (Mark Miller)
Optimizations
----------------------

View File

@ -968,8 +968,11 @@ public class IndexFetcher {
boolean success = false;
try {
if (slowFileExists(indexDir, fname)) {
LOG.info("Skipping move file - it already exists:" + fname);
return true;
LOG.warn("Cannot complete replication attempt because file already exists:" + fname);
// we fail - we downloaded the files we need, if we can't move one in, we can't
// count on the correct index
return false;
}
} catch (IOException e) {
SolrException.log(LOG, "could not check if a file exists", e);