[ 
https://issues.apache.org/jira/browse/DERBY-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582698#action_12582698
 ] 

Kristian Waagan commented on DERBY-3571:
----------------------------------------

Thanks for the comments Knut Anders.
This is work in progress, so the next patch will have some changes.

I will fix the typos, and also add more comments/JavaDoc. I renamed the method 
keepLocatorColumnAlive to markLOBAsAccessed, in hope that it gives more 
meaning...
See below regarding the rest of your comments.

* NoOpLOBStateTracker
  Yes, that is a good idea. It is now a singleton.
  It is also correct that it will be used for result sets without LOBs.

* Fixed assert.

* Rewrote code block for compactness.
  On a side note, this code will only be in 10.3. For 10.4 and trunk I plan to 
make a few changes so it is no longer required to know if it is a Blob or a 
Clob. This requires two changes; a small refactoring (issue not yet created) 
and optimization 1 mentioned in my earlier comment.


I will upload a replacement patch shortly, which addresses other problems in 1a.

> 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.1.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
>
>
> 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.

Reply via email to