lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [lucene-solr] branch master updated: SOLR-14211: Fix a bug introduced in SOLR-14192.
Date Thu, 23 Jan 2020 18:34:39 GMT
This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 434f902  SOLR-14211: Fix a bug introduced in SOLR-14192.
434f902 is described below

commit 434f90265b676211e06a4727327e775cf35c42bd
Author: Andrzej Bialecki <ab@apache.org>
AuthorDate: Thu Jan 23 19:33:12 2020 +0100

    SOLR-14211: Fix a bug introduced in SOLR-14192.
---
 solr/core/src/java/org/apache/solr/schema/SchemaManager.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/schema/SchemaManager.java b/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
index d059543..54619ed 100644
--- a/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
+++ b/solr/core/src/java/org/apache/solr/schema/SchemaManager.java
@@ -422,11 +422,12 @@ public class SchemaManager {
     SolrResourceLoader resourceLoader = core.getResourceLoader();
     String name = core.getLatestSchema().getResourceName();
     if (resourceLoader instanceof ZkSolrResourceLoader) {
-      SolrZkClient zkClient = ((ZkSolrResourceLoader) resourceLoader).getZkController().getZkClient();
+      final ZkSolrResourceLoader zkLoader = (ZkSolrResourceLoader)resourceLoader;
+      SolrZkClient zkClient = zkLoader.getZkController().getZkClient();
       try {
-        if (!zkClient.exists(name, true)) {
+        if (!zkClient.exists(zkLoader.getConfigSetZkPath() + "/" + name, true)) {
           String backupName = name + ManagedIndexSchemaFactory.UPGRADED_SCHEMA_EXTENSION;
-          if (!zkClient.exists(backupName, true)) {
+          if (!zkClient.exists(zkLoader.getConfigSetZkPath() + "/" + backupName, true)) {
             log.warn("Unable to retrieve fresh managed schema, neither " + name + " nor "
+ backupName + " exist.");
             // use current schema
             return (ManagedIndexSchema) core.getLatestSchema();


Mime
View raw message