Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
3.4
-
None
-
None
Description
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.
Attachments
Issue Links
- is superceded by
-
SOLR-14783 Remove DIH from 9.0
- Closed