db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Raymond" <raymond_de...@hotmail.com>
Subject Some other questions on Checkpointing.
Date Wed, 24 Aug 2005 07:01:49 GMT
>From: Mike Matrigali <mikem_app@sbcglobal.net>
>Reply-To: "Derby Development" <derby-dev@db.apache.org>
>To: Derby Development <derby-dev@db.apache.org>
>Subject: Re: Can anyone give me some suggestions?
>Date: Tue, 23 Aug 2005 10:03:35 -0700
>Yes, the key is that in normal operation the call to these routines
>is always done by a background process which is a different thread
>than normal client threads.  So database client threads procede
>while the checkpoint procedes.  The buffer cache is not locked for
>the duration of the checkpoint, only individual pages for the time
>it takes to copy the page from the buffer cache into the OS cache.

Thanks lots, I got what you said. But I still have some questions about 

1. If a buffer page, we call it B1 here, is updated before a checkpoint is 
and the log of the update is generated as L1. During the following 
depending on the WAL policy, log buffer will be first forced to disk, so L1 
be flushed to disk. Then the checkpoint process will try to write the cache 
to disk. My question is, since the checkpoint thread and the database client 
are asynchronous, it is possible another update on B1 happens before B1 is 
latched and
written out, later B1 will be written out but the log of the second update 
is not
written out yet. How does derby ensure the WAL policy in this case?

2. During a checkpoint, now derby will search all the cache buffer for dirty 
and write them out. Why don't we keep a dirty page list? Just IDs that can 
the corresponding dirty page are stored in the list, so it will not take a 
lot of
space. The first time a buffer page is updated, its ID will be appended to 
the list,
and after the dirty page has been written out, it will be released from the 
During a checkpoint, we just search from the head of the list to the end and 
the corresponding dirty pages out.


Powerful Parental Controls Let your child discover the best the Internet has 
to offer.  

  Start enjoying all the benefits of MSNŽ Premium right now and get the 
first two months FREE*.

View raw message