db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5730) DataDictionaryImpl leaks references to itself via SYSFUN_AD
Date Fri, 04 May 2012 16:38:48 GMT

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

Mike Matrigali commented on DERBY-5730:
---------------------------------------

the patch looks good to me.

Can you comment 
on expected performance degredation now that we are caching less, I don't know what work the
caching is saving.  Since we are still caching privately I think only expected degredation
is on first call for booted db, though I know there are some applications out there that boot
very often.  If there were no memory consequences does the existing
implementation have any correctness issues?  
                
> DataDictionaryImpl leaks references to itself via SYSFUN_AD
> -----------------------------------------------------------
>
>                 Key: DERBY-5730
>                 URL: https://issues.apache.org/jira/browse/DERBY-5730
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: Sysfun.java, d5730-1a.diff
>
>
> DataDictionaryImpl contains a static field called SYSFUN_AD, which holds an array of
AliasDescriptor objects for the functions in the SYSFUN schema. This array is lazily populated
as the functions are called, and it is shared between all DataDictionaryImpl instances on
the system.
> The AliasDescriptors contain references to the DataDictionaryImpl that created them,
so SYSFUN_AD may end up referencing indirectly to a number of different DataDictionaryImpl
instances, depending on where the respective SYSFUN functions are called the first time. Once
an AliasDescriptor has been added to SYSFUN_AD, it stays there until the DataDictionaryImpl
class is unloaded (in most cases, until the JVM terminates). This means the array may hold
references to DataDictionaryImpl instances that belong to database instances that have been
shut down, and that the memory held by those database instances never becomes eligible for
garbage collection.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message