[ 
https://issues.apache.org/jira/browse/SOLR-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexandre Rafalovitch resolved SOLR-2812.
-----------------------------------------
    Resolution: Won't Fix

> DataImportHandler doesn't always honour readOnly="false" on JdbcDataSources
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-2812
>                 URL: https://issues.apache.org/jira/browse/SOLR-2812
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 3.4
>            Reporter: Lucian Holland
>            Priority: Minor
>
> When JdbcDataSource creates a new connection, it checks to see if its 
> properties have readOnly="true". If it does, it sets the new JDBC connection 
> to be read-only. But the converse is not true, presumably because it assumes 
> that all newly created connections will be writable by default. This 
> assumption does not always hold. In my case, I was using container-managed 
> connections with Tomcat 6.0 which has a connection pool by default. 
> Occasionally, DIH would get a previously pooled connection that was readOnly. 
> I discovered this because I was doing some Evil Badness that meant the DIH 
> was actually writing to the DB as well as reading from it, which I imagine is 
> a very non-standard use case. Nonetheless it would seem uncontroversial for 
> JdbcDataSource to setReadOnly(false) explicitly.
> I'm sorry, it's kind of hard to provide a simple test case for this without 
> writing a dummy Jdbc driver or constructing a much more elaborate scenario, 
> but hopefully the issue is simple enough that this won't matter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to