[
https://issues.apache.org/jira/browse/DERBY-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Waagan updated DERBY-3571:
-----------------------------------
Attachment: derby-3571-1d-client_track_lob_fix.diff
'derby-3571-1d-client_track_lob_fix.diff' introduces a LOBStateTracker
interface and two implementations of it: SingleReleaseLOBTracker and
NoOpLOBTracker. As a follow-up patch for DERBY-3575, I plan to add
MultipleReleaseLOBTracker.
The trackers will use different mechanisms to release the locators. A final
step, which I don't plan to implement for 10.4, is to piggy-back locators to
release to the server on other requests. This approach is why I chose to add
the locatorsForRelease method.
To sum of the mechanism used by the trackers:
* NoOpLOBTracker: no release
* SingleReleaseLOBTracker: a stored procedure call for each locator to
release, invoked at every result set navigational methods and rs.close.
* MultipleReleaseLOBTracker: a stored procedure call for a set of locators to
release, invocation time not yet decided.
I'm running tests, and if they pass I plan to commit this patch later today.
> LOB locators are not released if the LOB columns are not accessed by the
> client
> -------------------------------------------------------------------------------
>
> Key: DERBY-3571
> URL: https://issues.apache.org/jira/browse/DERBY-3571
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Network Client
> Affects Versions: 10.3.2.1, 10.4.0.0, 10.5.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Attachments: derby-3571-1a-client_track_lob_fix.diff,
> derby-3571-1a-client_track_lob_fix.stat,
> derby-3571-1b-client_track_lob_fix.diff,
> derby-3571-1c-client_track_lob_fix.diff,
> derby-3571-1d-client_track_lob_fix.diff
>
>
> If the client creates a result set containing LOB locator columns and
> iterates through it without actually accessing the LOB columns, the locators
> are not released.
> The amount of locators and their associated LOB objects causes the server to
> consume large amounts of memory and it eventually gets an OOME.
> There are a few workarounds for this bug:
> a) Access and/or properly close the LOBs (i.e. Blob.free).
> This is partly dependent on DERBY-2892.
> b) Invoke Connection.commit (or rollback) periodically, which causes all
> locators on the connection to be released.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.