lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r907935 - in /lucene/solr/trunk/contrib/dataimporthandler: ./ src/main/java/org/apache/solr/handler/dataimport/
Date Tue, 09 Feb 2010 05:20:20 GMT
Author: noble
Date: Tue Feb  9 05:20:19 2010
New Revision: 907935

URL: http://svn.apache.org/viewvc?rev=907935&view=rev
Log:
 SOLR-1757: DIH multithreading sometimes throws NPE.

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ThreadedEntityProcessorWrapper.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt?rev=907935&r1=907934&r2=907935&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/solr/trunk/contrib/dataimporthandler/CHANGES.txt Tue Feb  9 05:20:19 2010
@@ -57,6 +57,8 @@
 
 * SOLR-1762: DateFormatTransformer does not work correctly with non-default locale dates
(tommy chheng via noble)
 
+* SOLR-1757: DIH multithreading sometimes throws NPE (noble)
+
 Other Changes
 ----------------------
 

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java?rev=907935&r1=907934&r2=907935&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java
Tue Feb  9 05:20:19 2010
@@ -345,11 +345,11 @@
     private DocWrapper docWrapper;
     private volatile boolean entityInitialized ;
     String currentProcess;
-    ThreadLocal<ThreadedEntityProcessorWrapper> currentEntityProcWrapper = new ThreadLocal<ThreadedEntityProcessorWrapper>();
+    final ThreadLocal<ThreadedEntityProcessorWrapper> currentEntityProcWrapper = new
ThreadLocal<ThreadedEntityProcessorWrapper>();
 
     private ContextImpl context;
-    EntityRunner parent;
-    AtomicBoolean entityEnded = new AtomicBoolean(false);
+    final EntityRunner parent;
+    final AtomicBoolean entityEnded = new AtomicBoolean(false);
     private Exception exception;
 
     public EntityRunner(DataConfig.Entity entity, EntityRunner parent) {

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java?rev=907935&r1=907934&r2=907935&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
Tue Feb  9 05:20:19 2010
@@ -126,8 +126,6 @@
 
     return factory = new Callable<Connection>() {
       public Connection call() throws Exception {
-        // Resolve variables again because the variables may have changed
-        resolveVariables(context, initProps);
         LOG.info("Creating a connection for entity "
                 + context.getEntityAttribute(DataImporter.NAME) + " with URL: "
                 + url);

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ThreadedEntityProcessorWrapper.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ThreadedEntityProcessorWrapper.java?rev=907935&r1=907934&r2=907935&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ThreadedEntityProcessorWrapper.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ThreadedEntityProcessorWrapper.java
Tue Feb  9 05:20:19 2010
@@ -36,10 +36,10 @@
 public class ThreadedEntityProcessorWrapper extends EntityProcessorWrapper {
   private static final Logger LOG = LoggerFactory.getLogger(ThreadedEntityProcessorWrapper.class);
 
-  DocBuilder.EntityRunner entityRunner;
+  final DocBuilder.EntityRunner entityRunner;
   /**For each child entity there is one EntityRunner
    */
-  Map<DataConfig.Entity ,DocBuilder.EntityRunner> children;
+  final Map<DataConfig.Entity ,DocBuilder.EntityRunner> children;
 
   public ThreadedEntityProcessorWrapper(EntityProcessor delegate, DocBuilder docBuilder,
                                   DocBuilder.EntityRunner entityRunner,



Mime
View raw message