db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2700) Invalid entries in the cache manager are not garbage collected until the CachedItem is reused
Date Sat, 26 May 2007 09:36:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499296
] 

Knut Anders Hatlen commented on DERBY-2700:
-------------------------------------------

Thinking more about it, this is perhaps what Cacheable.clearIdentity() is supposed to take
care of. clearIdentity() seems to take a more minimalistic approach, only clearing data that
definitely cannot be reused when setting a new identity. I think it makes some sense to clear
the entire Cacheable when it's invalidated, since it shouldn't happen too frequently and one
don't know whether it will or can be reused later (for instance, because of different page
sizes), but I'm not convinced it's the best solution.

> Invalid entries in the cache manager are not garbage collected until the CachedItem is
reused
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2700
>                 URL: https://issues.apache.org/jira/browse/DERBY-2700
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: 2700.diff
>
>
> When an entry in the cache manager becomes invalid (for instance because a table is dropped),
it cannot be garbage collected because we only set the valid_ field in CachedItem to false.
We should also set entry to null to make the Cacheable eligible for garbage collection. Currently,
invalid cached objects cannot be garbage collected until their CachedItems are reused. This
causes Derby to hold on to resources too long, and can in the worst case lead to an OutOfMemoryError.

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