[ https://issues.apache.org/jira/browse/SOLR-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041788#comment-13041788 ]
Fuad Efendi commented on SOLR-2233: ----------------------------------- Hi Frank, yes, correct; although it's hard to recall what I did... unfortunately reformatted... I can resubmit (apply patch & format with Lucene style & generate patch); but better to redo it from scratch again. Existing code doesn't run multithreaded; and it is slow even for single-thread (inappropriate JDBC usage) I completely removed this code: - private Connection getConnection() throws Exception { - long currTime = System.currentTimeMillis(); - if (currTime - connLastUsed > CONN_TIME_OUT) { - synchronized (this) { - Connection tmpConn = factory.call(); - closeConnection(); - connLastUsed = System.currentTimeMillis(); - return conn = tmpConn; - - } else { - connLastUsed = currTime; - return conn; } } > DataImportHandler - JdbcDataSource is not thread safe > ----------------------------------------------------- > > Key: SOLR-2233 > URL: https://issues.apache.org/jira/browse/SOLR-2233 > 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 > > > 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: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org