You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2015/09/23 14:58:27 UTC

svn commit: r1704841 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/handler/IndexFetcher.java

Author: markrmiller
Date: Wed Sep 23 12:58:25 2015
New Revision: 1704841

URL: http://svn.apache.org/viewvc?rev=1704841&view=rev
Log:
SOLR-8077: Replication can still cause index corruption.

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1704841&r1=1704840&r2=1704841&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Wed Sep 23 12:58:25 2015
@@ -115,6 +115,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
 ----------------------

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java?rev=1704841&r1=1704840&r2=1704841&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java Wed Sep 23 12:58:25 2015
@@ -938,8 +938,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);