mirror of https://github.com/apache/lucene.git
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:
parent
1dd48e2a78
commit
3eb663ea10
|
@ -57,6 +57,8 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-1762: DateFormatTransformer does not work correctly with non-default locale dates (tommy chheng via noble)
|
* 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
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -345,11 +345,11 @@ public class DocBuilder {
|
||||||
private DocWrapper docWrapper;
|
private DocWrapper docWrapper;
|
||||||
private volatile boolean entityInitialized ;
|
private volatile boolean entityInitialized ;
|
||||||
String currentProcess;
|
String currentProcess;
|
||||||
ThreadLocal<ThreadedEntityProcessorWrapper> currentEntityProcWrapper = new ThreadLocal<ThreadedEntityProcessorWrapper>();
|
final ThreadLocal<ThreadedEntityProcessorWrapper> currentEntityProcWrapper = new ThreadLocal<ThreadedEntityProcessorWrapper>();
|
||||||
|
|
||||||
private ContextImpl context;
|
private ContextImpl context;
|
||||||
EntityRunner parent;
|
final EntityRunner parent;
|
||||||
AtomicBoolean entityEnded = new AtomicBoolean(false);
|
final AtomicBoolean entityEnded = new AtomicBoolean(false);
|
||||||
private Exception exception;
|
private Exception exception;
|
||||||
|
|
||||||
public EntityRunner(DataConfig.Entity entity, EntityRunner parent) {
|
public EntityRunner(DataConfig.Entity entity, EntityRunner parent) {
|
||||||
|
|
|
@ -126,8 +126,6 @@ public class JdbcDataSource extends
|
||||||
|
|
||||||
return factory = new Callable<Connection>() {
|
return factory = new Callable<Connection>() {
|
||||||
public Connection call() throws Exception {
|
public Connection call() throws Exception {
|
||||||
// Resolve variables again because the variables may have changed
|
|
||||||
resolveVariables(context, initProps);
|
|
||||||
LOG.info("Creating a connection for entity "
|
LOG.info("Creating a connection for entity "
|
||||||
+ context.getEntityAttribute(DataImporter.NAME) + " with URL: "
|
+ context.getEntityAttribute(DataImporter.NAME) + " with URL: "
|
||||||
+ url);
|
+ url);
|
||||||
|
|
|
@ -36,10 +36,10 @@ import java.util.Collections;
|
||||||
public class ThreadedEntityProcessorWrapper extends EntityProcessorWrapper {
|
public class ThreadedEntityProcessorWrapper extends EntityProcessorWrapper {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ThreadedEntityProcessorWrapper.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ThreadedEntityProcessorWrapper.class);
|
||||||
|
|
||||||
DocBuilder.EntityRunner entityRunner;
|
final DocBuilder.EntityRunner entityRunner;
|
||||||
/**For each child entity there is one 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,
|
public ThreadedEntityProcessorWrapper(EntityProcessor delegate, DocBuilder docBuilder,
|
||||||
DocBuilder.EntityRunner entityRunner,
|
DocBuilder.EntityRunner entityRunner,
|
||||||
|
|
Loading…
Reference in New Issue