lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fuad Efendi (JIRA)" <>
Subject [jira] [Commented] (SOLR-2233) DataImportHandler - JdbcDataSource is not thread safe
Date Sun, 05 Jun 2011 07:26:48 GMT


Fuad Efendi commented on SOLR-2233:

Note that with this implementation "connection" is closed only when main instance of main
class finalized => connection never closed; so that the code is still naive (server can
close connection - how will we know that?) - fortunately it doesn't happen in my specific
case already few months of night imports...

We should use connection pooling - this would be next improvement; conn.close() in this case
will return connection to pool (without closing it), and pool is responsible for testing connections
for liveness.

> DataImportHandler - JdbcDataSource is not thread safe
> -----------------------------------------------------
>                 Key: SOLR-2233
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.5
>            Reporter: Fuad Efendi
>         Attachments: FE-patch.txt, SOLR-2233-JdbcDataSource.patch, SOLR-2233-JdbcDataSource.patch,
SOLR-2233.patch, SOLR-2233.patch
> Whenever Thread A spends more than 10 seconds on a Connection (by retrieving records
in a batch), Thread B will close connection.
> Related exceptions happen when we use "threads=" attribute for entity; usually exception
stack contains message "connection already closed"
> It shouldn't happen with some JNDI data source, where Connection.close() simply returns
Connection to a pool of available connections, but we might get different errors.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message