mirror of https://github.com/apache/lucene.git
SOLR-1983 SOLR-2156: set replication flags and cleanup
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1064942 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f12b4ab2ff
commit
5d8790eb85
|
@ -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
|
||||
----------------------
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue