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

Anurag Shekhar commented on DERBY-3354:
---------------------------------------

LobMapping and locater is used by the stored procedures (on behalf of 
network driver) to get hold of a particular lob object. LobMapping is 
additionally 
used to clear the lob object during commit/rollback and connection close. 

Separating these two functionality in two different collections may solve OOM 
problem.

We can continue to have LobMapping only if the LOB is created through client 
driver (entry will 
be made in LOBMapiing in getLocator)

Create methods will make an entry to a new collection holding week references 
of the LOBs. 

This will ensure that LOB will get garbage collected if they unreferenced in 
Embedded 
mode but in case of client server mode the references will be protected from 
being garbage 
collected unless free is called by the stored procedure. 

> Select from large lob table with embedded gives OutOfMemoryError
> ----------------------------------------------------------------
>
>                 Key: DERBY-3354
>                 URL: https://issues.apache.org/jira/browse/DERBY-3354
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.1.4, 10.3.2.1, 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Anurag Shekhar
>         Attachments: derby-3354.diff, LocLeak.java
>
>
> Retrieving from a large table with lobs gives an OutOfMemoryException, even 
> if free() is explictly called on the lob.   I believe this is because 
> EmbedConnection.addLobMapping is called for every lob creation but is never 
> cleared until commit or rollback, even if the lob is freed.

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