From 5755634db6a841d95678ba8facff1da44bb92fb2 Mon Sep 17 00:00:00 2001 From: Timothy Potter Date: Mon, 16 Jun 2014 18:36:08 +0000 Subject: [PATCH] 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 --- solr/CHANGES.txt | 4 ++++ solr/core/src/java/org/apache/solr/handler/SnapShooter.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 5a6527ba069..5ce100456ee 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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) diff --git a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java index 6150d4f5176..913f339ef87 100644 --- a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java +++ b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java @@ -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();