Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
7.5, 9.0
-
None
Description
DIH imports don't close DataSource's (which can hold db connections, etc.) in all cases. Specifically, if an import runs into an unexpected error forwarding processed docs to other nodes, it will neglect to close the DataSource's when it finishes.
This problem goes back to at least 7.5. This is partially mitigated in older versions of some DataSource implementations (e.g. JdbcDataSource) by means of a "finalize" hook which invokes "close()" when the DataSource object is garbage-collected. In practice, this means that resources might be held open longer than necessary but will be closed within a few seconds or minutes by GC. This only helps JdbcDataSource though - all other DataSource impl's risk leaking resources.
In master/9.0, which requires a minimum of Java 11 and doesn't have the finalize-hook, the connections are never cleaned up when an error is encountered during DIH. DIH will likely be removed for the 9.0 release, but if it isn't this bug should be fixed.
Attachments
Attachments
Issue Links
- links to