You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2020/09/19 05:22:31 UTC

[lucene-solr] 03/10: Revert "SOLR-14151: Fixing TestBulkSchemaConcurrent failures"

This is an automated email from the ASF dual-hosted git repository.

ishan pushed a commit to branch jira/solr-14151-revert-8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 6ab1035713a7e39b321b481a1857ebe81d66484b
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Sat Sep 19 10:49:21 2020 +0530

    Revert "SOLR-14151: Fixing TestBulkSchemaConcurrent failures"
    
    This reverts commit 641589a9fbe7c01be9b340133d49b33ad64d21ea.
---
 solr/core/src/java/org/apache/solr/core/ConfigSet.java | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/ConfigSet.java b/solr/core/src/java/org/apache/solr/core/ConfigSet.java
index 7161bc1..8112477 100644
--- a/solr/core/src/java/org/apache/solr/core/ConfigSet.java
+++ b/solr/core/src/java/org/apache/solr/core/ConfigSet.java
@@ -30,7 +30,6 @@ public class ConfigSet {
   private final String name;
 
   private final SolrConfig solrconfig;
-  private IndexSchema schema;
 
   private final SchemaSupplier schemaSupplier;
 
@@ -41,11 +40,10 @@ public class ConfigSet {
 
   @SuppressWarnings({"rawtypes"})
   public ConfigSet(String name, SolrConfig solrConfig, SchemaSupplier indexSchemaSupplier,
-                   NamedList properties, boolean trusted) {
+      NamedList properties, boolean trusted) {
     this.name = name;
     this.solrconfig = solrConfig;
     this.schemaSupplier = indexSchemaSupplier;
-    schema = schemaSupplier.get(true);
     this.properties = properties;
     this.trusted = trusted;
   }
@@ -63,18 +61,17 @@ public class ConfigSet {
    * @param forceFetch get a fresh value and not cached value
    */
   public IndexSchema getIndexSchema(boolean forceFetch) {
-    if(forceFetch)  schema = schemaSupplier.get(true);
-    return schema;
+    return schemaSupplier.get(forceFetch);
   }
   public IndexSchema getIndexSchema() {
-    return schema;
+    return schemaSupplier.get(false);
   }
 
   @SuppressWarnings({"rawtypes"})
   public NamedList getProperties() {
     return properties;
   }
-
+  
   public boolean isTrusted() {
     return trusted;
   }
@@ -85,7 +82,7 @@ public class ConfigSet {
    * So, we may not be able to update the core if we the schema classes are updated
    * */
   interface SchemaSupplier {
-    IndexSchema get(boolean forceFetch);
+     IndexSchema get(boolean forceFetch);
 
   }
 }