db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3354) Select from large lob table with embedded gives OutOfMemoryError
Date Thu, 03 Apr 2008 08:50:26 GMT

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

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

Thanks Øystein  for look at the patch.

My question is whether it is OK that free is not called on the LOB objects that are garbage-collected
this way. Are you certain that all associated resources (e.g., temp files) will be released?
Maybe some finalizer clean-up will also be needed?

If there is no free called (or release on internal clob) the temporary file will not be cleaned.
But the temporary file 
system is cleaned every time db boots up. I was under impression that disk operations are
not allowed from 
finalize. Probably I was wrong. I will check and if its not restricted I will add finalizer
for EmbedClob and 
EmbedBlob.

Other comments/questions:
  * It seems getLocator will create a new locator on every call. I think there should be just
a single locator per object. Otherwise, I think the clean-up will be difficult.

I will be checking it to check if the locator is 0 before calling addMapping. 

  * free: Willl removeLOBMapping handle correctly the cases where a locator has not been set?
HashMap ignore remove call if key is not found in the Map So there is no problem If we call

remove with invalid key.

  * typo: Refrence 
I will fix this,

> 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, derby-3354_preview.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.


Mime
View raw message