You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2011/01/29 03:24:53 UTC
svn commit: r1064942 - in /lucene/dev/trunk/solr: CHANGES.txt
src/java/org/apache/solr/handler/SnapPuller.java
Author: yonik
Date: Sat Jan 29 02:24:53 2011
New Revision: 1064942
URL: http://svn.apache.org/viewvc?rev=1064942&view=rev
Log:
SOLR-1983 SOLR-2156: set replication flags and cleanup
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/src/java/org/apache/solr/handler/SnapPuller.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1064942&r1=1064941&r2=1064942&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Jan 29 02:24:53 2011
@@ -653,6 +653,11 @@ Bug Fixes
* SOLR-2261: fix velocity template layout.vm that referred to an older
version of jquery. (Eric Pugh via rmuir)
+* SOLR-1983: snappuller fails when modifiedConfFiles is not empty and
+ full copy of index is needed. (Alexander Kanarsky via yonik)
+
+* SOLR-2156: SnapPuller fails to clean Old Index Directories on Full Copy
+ (Jayendra Patil via yonik)
Other Changes
----------------------
Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/SnapPuller.java?rev=1064942&r1=1064941&r2=1064942&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/handler/SnapPuller.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/handler/SnapPuller.java Sat Jan 29 02:24:53 2011
@@ -300,15 +300,17 @@ public class SnapPuller {
isFullCopyNeeded = true;
successfulInstall = false;
boolean deleteTmpIdxDir = true;
+ File indexDir = null ;
try {
- File indexDir = new File(core.getIndexDir());
+ indexDir = new File(core.getIndexDir());
downloadIndexFiles(isFullCopyNeeded, tmpIndexDir, latestVersion);
LOG.info("Total time taken for download : " + ((System.currentTimeMillis() - replicationStartTime) / 1000) + " secs");
Collection<Map<String, Object>> modifiedConfFiles = getModifiedConfFiles(confFilesToDownload);
if (!modifiedConfFiles.isEmpty()) {
downloadConfFiles(confFilesToDownload, latestVersion);
if (isFullCopyNeeded) {
- modifyIndexProps(tmpIndexDir.getName());
+ successfulInstall = modifyIndexProps(tmpIndexDir.getName());
+ deleteTmpIdxDir = false;
} else {
successfulInstall = copyIndexFiles(tmpIndexDir, indexDir);
}
@@ -339,7 +341,8 @@ public class SnapPuller {
} catch (Exception e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Index fetch failed : ", e);
} finally {
- if(deleteTmpIdxDir) delTree(tmpIndexDir);
+ if (deleteTmpIdxDir) delTree(tmpIndexDir);
+ else delTree(indexDir);
}
return successfulInstall;
} finally {