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] [Updated] (DERBY-6733) Implement an MBean for monitoring caches
Date Fri, 12 Sep 2014 12:16:33 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-6733:
    Attachment: d6733-2a-statement-cache.diff

[^d6733-2a-statement-cache.diff] adds an MBean that allow users to monitor the statement cache.

While writing tests for it, I realized that the previous patch had confused the AllocatedEntries
attribute and the UsedEntries attribute. AllocatedEntries actually returned what UsedEntries
was supposed to return, and, because of that, UsedEntries accounted the free entries twice
and therefore gave a too low number. The patch also fixes this problem.

It makes the following changes:

*impl/sql/conn/GenericLanguageConnectionFactory.java*: register the statement cache MBean
in boot() and deregister it in stop()
*iapi/services/cache/CacheManager.java*: add a method for deregistering the MBean at shutdown,
used by GenericLanguageConnectionFactory.stop()
*iapi/store/raw/data/DataFactory.java, impl/store/raw/data/BaseDataFileFactory.java*: expose
the getRootDirectory() method to allow GenericLanguageConnectionFactory.boot() to set the
db name property of the MBean
*impl/services/cache/ReplacementPolicy.java, impl/services/cache/ClockPolicy.java*: expose
the size of the clock data structure
*impl/services/cache/ConcurrentCache.java*: add method to deregister the MBean, and adjust
previously incorrect calculations of AllocatedEntries and UsedEntries
*tests/management/CacheManagerMBeanTest.java*: add functional tests for the statement cache

All regression tests ran cleanly with the patch.

> Implement an MBean for monitoring caches
> ----------------------------------------
>                 Key: DERBY-6733
>                 URL: https://issues.apache.org/jira/browse/DERBY-6733
>             Project: Derby
>          Issue Type: Improvement
>          Components: JMX
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d6733-1a-page-and-container.diff, d6733-2a-statement-cache.diff
> Add an MBean that allows users to monitor Derby's CacheFactory instances, as discussed
in DERBY-5772.

This message was sent by Atlassian JIRA

View raw message