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:56:16 UTC

svn commit: r1704840 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/handler/IndexFetcher.java

Author: markrmiller
Date: Wed Sep 23 12:56:15 2015
New Revision: 1704840

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

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1704840&r1=1704839&r2=1704840&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Sep 23 12:56:15 2015
@@ -212,6 +212,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/trunk/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java?rev=1704840&r1=1704839&r2=1704840&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java Wed Sep 23 12:56:15 2015
@@ -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);