You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/08/11 07:10:40 UTC

[lucene-solr] branch reference_impl_dev updated (b209d75 -> 6f05fc3)

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

markrmiller pushed a change to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from b209d75  @499 Fail on inform error.
     new 4283b8b  @500 Careful about hanging on shutdown.
     new 6f05fc3  @501 Transformer can be shared.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 solr/core/src/java/org/apache/solr/core/XmlConfigFile.java   | 10 +++++-----
 .../src/java/org/apache/solr/common/ParWorkExecService.java  | 12 ++----------
 2 files changed, 7 insertions(+), 15 deletions(-)


[lucene-solr] 01/02: @500 Careful about hanging on shutdown.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4283b8b2945d2186691d28226ebcc06a48b35d19
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Aug 11 02:05:42 2020 -0500

    @500 Careful about hanging on shutdown.
---
 .../src/java/org/apache/solr/common/ParWorkExecService.java  | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/ParWorkExecService.java b/solr/solrj/src/java/org/apache/solr/common/ParWorkExecService.java
index 7b51cb0..a1ae52b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/ParWorkExecService.java
+++ b/solr/solrj/src/java/org/apache/solr/common/ParWorkExecService.java
@@ -99,11 +99,7 @@ public class ParWorkExecService implements ExecutorService {
           return CompletableFuture.completedFuture(callable.call());
         }
       } else {
-        try {
-          available.acquire();
-        } catch (InterruptedException e) {
-          available.acquire();
-        }
+        return service.submit(callable);
       }
       Future<T> future = service.submit(callable);
       return new Future<T>() {
@@ -192,11 +188,7 @@ public class ParWorkExecService implements ExecutorService {
           return CompletableFuture.completedFuture(null);
         }
       } else {
-        try {
-          available.acquire();
-        } catch (InterruptedException e) {
-          available.acquire();
-        }
+        return service.submit(runnable);
       }
       Future<?> future = service.submit(runnable);
 


[lucene-solr] 02/02: @501 Transformer can be shared.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f05fc3af8749365618c76f76c68e6d758c60ba5
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Aug 11 02:05:57 2020 -0500

    @501 Transformer can be shared.
---
 solr/core/src/java/org/apache/solr/core/XmlConfigFile.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/XmlConfigFile.java b/solr/core/src/java/org/apache/solr/core/XmlConfigFile.java
index e1a9ad5..1256cfa 100644
--- a/solr/core/src/java/org/apache/solr/core/XmlConfigFile.java
+++ b/solr/core/src/java/org/apache/solr/core/XmlConfigFile.java
@@ -23,6 +23,8 @@ import com.fasterxml.aalto.WFCException;
 import com.fasterxml.aalto.dom.DOMWriterImpl;
 import com.fasterxml.aalto.stax.InputFactoryImpl;
 import com.fasterxml.aalto.util.IllegalCharHandler;
+import net.sf.saxon.BasicTransformerFactory;
+import net.sf.saxon.TransformerFactoryImpl;
 import net.sf.saxon.dom.DocumentBuilderImpl;
 import net.sf.saxon.jaxp.SaxonTransformerFactory;
 import net.sf.saxon.xpath.XPathFactoryImpl;
@@ -87,10 +89,11 @@ public class XmlConfigFile { // formerly simply "Config"
   public static final XMLErrorLogger xmllog = new XMLErrorLogger(log);
   public static final DOMConverter convertor = new DOMConverter();
   public static final XPathFactory xpathFactory = new XPathFactoryImpl();
-  public static final SaxonTransformerFactory tfactory = new SaxonTransformerFactory();
+  public static final SaxonTransformerFactory tfactory = new BasicTransformerFactory();
   static  {
    // tfactory.getConfiguration().setBooleanProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.TRUE);
   }
+  public static final Transformer tx = tfactory.newTransformer();
 
   private final Document doc;
   //private final Document origDoc; // with unsubstituted properties
@@ -281,9 +284,7 @@ public class XmlConfigFile { // formerly simply "Config"
     } catch (XMLStreamException e) {
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
     }
-
-
-
+    
     this.substituteProperties = substituteProps;
     if (substituteProps != null) {
       DOMUtil.substituteProperties(doc, substituteProperties);
@@ -291,7 +292,6 @@ public class XmlConfigFile { // formerly simply "Config"
   }
 
   private static Document copyDoc(Document doc) throws TransformerException {
-    Transformer tx = tfactory.newTransformer();
     DOMSource source = new DOMSource(doc);
     DOMResult result = new DOMResult();
     tx.transform(source, result);