You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/10/17 13:10:50 UTC

[jira] Created: (DERBY-3131) Background cleaner has no daemon service after database creation

Background cleaner has no daemon service after database creation
----------------------------------------------------------------

                 Key: DERBY-3131
                 URL: https://issues.apache.org/jira/browse/DERBY-3131
             Project: Derby
          Issue Type: Bug
          Components: Services, Store
    Affects Versions: 10.4.0.0
            Reporter: Knut Anders Hatlen
            Priority: Minor


When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-3131:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-3131.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
       Derby Info:   (was: [Patch Available])

Committed revision 600457.

> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: d3131.diff, d3131.stat
>
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3131:
--------------------------------------

    Attachment: d3131.stat
                d3131.diff

With the attached patch, the background cleaner is also started the first time a database is booted (verified with the repro posted above). I moved the starting of the background cleaner out of BaseDataFileFactory.postRecovery() to a separate method called setupCacheCleaner(). This method is now invoked at the end of LogToFile.recover() regardless of whether or not recovery actually has been performed.

I have started suites.All and derbyall.

> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3131.diff, d3131.stat
>
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3131:
--------------------------------------

    Derby Info: [Patch Available]

The tests ran cleanly.

> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3131.diff, d3131.stat
>
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-3131.
-------------------------------------


> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: d3131.diff, d3131.stat
>
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3131) Background cleaner has no daemon service after database creation

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535506 ] 

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

To reproduce put some println statements in Clock.useDaemonService() and try this in ij:

ij version 10.4
ij> connect 'jdbc:derby:mydb;create=true';  
ij> disconnect;
ij> connect 'jdbc:derby:mydb;shutdown=true';
ERROR 08006: Database 'mydb' shutdown.
ij> connect 'jdbc:derby:mydb';
useDaemonService(org.apache.derby.impl.services.daemon.BasicDaemon@160c4b0)
name: ContainerCache
useDaemonService(org.apache.derby.impl.services.daemon.BasicDaemon@160c4b0)
name: PageCache
ij> 

useDaemonService() is not called on the first boot, but it is called on the second boot.

> Background cleaner has no daemon service after database creation
> ----------------------------------------------------------------
>
>                 Key: DERBY-3131
>                 URL: https://issues.apache.org/jira/browse/DERBY-3131
>             Project: Derby
>          Issue Type: Bug
>          Components: Services, Store
>    Affects Versions: 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>
> When a database is booted, the page cache and the container cache are given a daemon service to perform operations in the background. This happens in BaseDataFileFactory.postRecovery(). When a new database is created this code is not executed (presumably because we don't perform recovery), so its background cleaner remains inactive until the database is rebooted. The background cleaner should be active after the first boot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.