You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2013/09/27 23:19:53 UTC
svn commit: r1527085 - in /lucene/dev/branches/lucene_solr_4_5: ./ solr/
solr/CHANGES.txt solr/core/
solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java
Author: sarowe
Date: Fri Sep 27 21:19:52 2013
New Revision: 1527085
URL: http://svn.apache.org/r1527085
Log:
SOLR-5279: Implicit properties don't seem to exist on core RELOAD (merged trunk r1527042 and r1527076)
Modified:
lucene/dev/branches/lucene_solr_4_5/ (props changed)
lucene/dev/branches/lucene_solr_4_5/solr/ (props changed)
lucene/dev/branches/lucene_solr_4_5/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/lucene_solr_4_5/solr/core/ (props changed)
lucene/dev/branches/lucene_solr_4_5/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
lucene/dev/branches/lucene_solr_4_5/solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java
Modified: lucene/dev/branches/lucene_solr_4_5/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_5/solr/CHANGES.txt?rev=1527085&r1=1527084&r2=1527085&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_5/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_5/solr/CHANGES.txt Fri Sep 27 21:19:52 2013
@@ -219,6 +219,9 @@ Bug Fixes
* SOLR-5281: IndexSchema log message was printing '[null]' instead of
'[<core name>]' (Jun Ohtani via Steve Rowe)
+* SOLR-5279: Implicit properties don't seem to exist on core RELOAD
+ (elyograg, hossman, Steve Rowe)
+
Optimizations
----------------------
Modified: lucene/dev/branches/lucene_solr_4_5/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_5/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java?rev=1527085&r1=1527084&r2=1527085&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_5/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java (original)
+++ lucene/dev/branches/lucene_solr_4_5/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java Fri Sep 27 21:19:52 2013
@@ -56,6 +56,7 @@ public class CoreDescriptor {
public static final String CORE_LOADONSTARTUP = "loadOnStartup";
public static final String CORE_TRANSIENT = "transient";
public static final String CORE_NODE_NAME = "coreNodeName";
+ public static final String SOLR_CORE_PROP_PREFIX = "solr.core.";
public static final String DEFAULT_EXTERNAL_PROPERTIES_FILE = "conf" + File.separator + "solrcore.properties";
@@ -214,7 +215,7 @@ public class CoreDescriptor {
for (String propName : coreProperties.stringPropertyNames()) {
String propValue = coreProperties.getProperty(propName);
if (!isUserDefinedProperty(propName))
- propName = "solr.core." + propName;
+ propName = SOLR_CORE_PROP_PREFIX + propName;
substitutableProperties.setProperty(propName, propValue);
}
}
@@ -261,12 +262,14 @@ public class CoreDescriptor {
*/
public CoreDescriptor(String coreName, CoreDescriptor other) {
this.coreContainer = other.coreContainer;
+ this.cloudDesc = other.cloudDesc;
this.originalExtraProperties.putAll(other.originalExtraProperties);
this.originalCoreProperties.putAll(other.originalCoreProperties);
this.coreProperties.putAll(other.coreProperties);
+ this.substitutableProperties.putAll(other.substitutableProperties);
this.coreProperties.setProperty(CORE_NAME, coreName);
this.originalCoreProperties.setProperty(CORE_NAME, coreName);
- this.cloudDesc = other.cloudDesc;
+ this.substitutableProperties.setProperty(SOLR_CORE_PROP_PREFIX + CORE_NAME, coreName);
}
public String getPropertiesName() {
Modified: lucene/dev/branches/lucene_solr_4_5/solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_5/solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java?rev=1527085&r1=1527084&r2=1527085&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_5/solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java (original)
+++ lucene/dev/branches/lucene_solr_4_5/solr/core/src/test/org/apache/solr/core/TestImplicitCoreProperties.java Fri Sep 27 21:19:52 2013
@@ -31,6 +31,8 @@ public class TestImplicitCoreProperties
try {
cc.load();
assertQ(req("q", "*:*"), "//str[@name='dummyParam'][.='collection1']");
+ // Test for SOLR-5279 - make sure properties are there on core reload
+ cc.reload("collection1");
}
finally {
cc.shutdown();