diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java b/solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java
index 5f83f88c8eb..07f310c696e 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java
@@ -66,6 +66,20 @@ public ZkConfigSetService(SolrZkClient zkClient) {
this.zkClient = zkClient;
}
+ /**
+ * Do not perform Zk operations if configSetName is provided.
+ *
+ *
This is only used by {@link org.apache.solr.core.SyntheticSolrCore}, which is not registered
+ * with Zookeeper
+ */
+ @Override
+ protected SolrResourceLoader createCoreResourceLoader(CoreDescriptor cd, String configSetName) {
+ return configSetName != null
+ ? new ZkSolrResourceLoader(
+ cd.getInstanceDir(), configSetName, parentLoader.getClassLoader(), zkController)
+ : createCoreResourceLoader(cd);
+ }
+
@Override
public SolrResourceLoader createCoreResourceLoader(CoreDescriptor cd) {
final String colName = cd.getCollectionName();
diff --git a/solr/core/src/java/org/apache/solr/core/ConfigSetService.java b/solr/core/src/java/org/apache/solr/core/ConfigSetService.java
index 32432d9f18b..c6d333f7d21 100644
--- a/solr/core/src/java/org/apache/solr/core/ConfigSetService.java
+++ b/solr/core/src/java/org/apache/solr/core/ConfigSetService.java
@@ -251,8 +251,19 @@ public boolean isConfigSetTrusted(SolrResourceLoader coreLoader) throws IOExcept
* @return a ConfigSet
*/
public final ConfigSet loadConfigSet(CoreDescriptor dcore) {
+ return loadConfigSet(dcore, null);
+ }
+
+ /**
+ * Load the ConfigSet for a core with an explicit config set name
+ *
+ * @param dcore the core's CoreDescriptor
+ * @param configSetName an optional and explicit config set name
+ * @return a ConfigSet
+ */
+ final ConfigSet loadConfigSet(CoreDescriptor dcore, String configSetName) {
- SolrResourceLoader coreLoader = createCoreResourceLoader(dcore);
+ SolrResourceLoader coreLoader = createCoreResourceLoader(dcore, configSetName);
try {
// ConfigSet properties are loaded from ConfigSetProperties.DEFAULT_FILENAME file.
@@ -391,6 +402,20 @@ protected NamedList