You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by va...@apache.org on 2015/03/31 17:04:10 UTC

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

Author: varun
Date: Tue Mar 31 15:04:09 2015
New Revision: 1670359

URL: http://svn.apache.org/r1670359
Log:
SOLR-7324: IndexFetcher does not need to call isIndexStale if full copy is already needed

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=1670359&r1=1670358&r2=1670359&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Tue Mar 31 15:04:09 2015
@@ -368,6 +368,9 @@ Optimizations
  * SOLR-7239: improved performance of min & max in StatsComponent, as well as situations 
    where local params disable all stats (hossman)
 
+ * SOLR-7324: IndexFetcher does not need to call isIndexStale if full copy is already needed
+   (Stephan Lagraulet via Varun Thacker)
+
 Other Changes
 ----------------------
 

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=1670359&r1=1670358&r2=1670359&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 Tue Mar 31 15:04:09 2015
@@ -362,8 +362,10 @@ public class IndexFetcher {
       indexDir = core.getDirectoryFactory().get(indexDirPath, DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
 
       try {
-        
-        if (isIndexStale(indexDir)) {
+
+        //We will compare all the index files from the master vs the index files on disk to see if there is a mismatch
+        //in the metadata. If there is a mismatch for the same index file then we download the entire index again.
+        if (!isFullCopyNeeded && isIndexStale(indexDir)) {
           isFullCopyNeeded = true;
         }