SOLR-5956: Use getInstanceDir instead of getRawInstanceDir as that was causing issues when trying to create a backup of an index on Linux when solr.solr.home is a symbolic link.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1602953 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy Potter 2014-06-16 18:36:08 +00:00
parent 6c968ffd0a
commit 5755634db6
2 changed files with 5 additions and 1 deletions

View File

@ -138,6 +138,10 @@ New Features
Bug Fixes
----------------------
* SOLR-5956: Use coreDescriptor.getInstanceDir() instead of getRawInstanceDir()
in the SnapShooter to avoid problems when solr.solr.home is a symbolic link.
(Timothy Potter)
* SOLR-6002: Fix a couple of ugly issues around SolrIndexWriter close and
rollback as well as how SolrIndexWriter manages it's ref counted directory
instance. (Mark Miller, Gregory Chanan)

View File

@ -62,7 +62,7 @@ public class SnapShooter {
solrCore = core;
if (location == null) snapDir = core.getDataDir();
else {
File base = new File(core.getCoreDescriptor().getRawInstanceDir());
File base = new File(core.getCoreDescriptor().getInstanceDir());
snapDir = org.apache.solr.util.FileUtils.resolvePath(base, location).getAbsolutePath();
File dir = new File(snapDir);
if (!dir.exists()) dir.mkdirs();