SOLR-1757: DIH multithreading sometimes throws NPE.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@907935 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2010-02-09 05:20:19 +00:00
parent 1dd48e2a78
commit 3eb663ea10
4 changed files with 7 additions and 7 deletions

View File

@ -57,6 +57,8 @@ Bug Fixes
* 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
----------------------

View File

@ -345,11 +345,11 @@ public class DocBuilder {
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) {

View File

@ -126,8 +126,6 @@ public class JdbcDataSource extends
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);

View File

@ -36,10 +36,10 @@ import java.util.Collections;
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,