db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: A question about dirty pages.
Date Wed, 01 Mar 2006 18:04:51 GMT
Yes, you are right.  It does not really need to be written, but
in the current implementation it doesn't cost very much to
write it since we sync the entire file at the end.  I tried to
add some more descriptive comments about this in:

BaseDataFileFactory.java!checkpoint

The actual loop is in the cachemanager cleanAll implementation.

Raymond Raymond wrote:
> I have a question needs to be confirmed. Anyone can help me?
> 
> In checkpoint, derby checks from the last cached item in the
> holder array to the first one(ref: 
> org.apache.derby.impl.services.cache.Clock.java)
> to find dirty pages and write them out.
> A cache page, which is clean before checkpoint starts and is updated
> after checkpoint starts, will have a chance to be written out by the
> current checkpoint process. Am I right?
> For instance, let's assume derby keeps 1000 cache pages. When
> checkpoint starts, it checks from the 1000th cache page to the
> first one. When it goes to check the 800th cache page, the 700th
> cache page is updated. The 700th cache page will be checked later
> and written out as a dirty page( assume it is valid). If the 900th cache
> page is updated when the 800th cache page is checked. The 900th
> cache page will not be written out by the current checkpoint process.
> Am I right?
> 
> Thanks.
> 
> 
> Raymond
> 
> _________________________________________________________________
> Take charge with a pop-up guard built on patented Microsoft® SmartScreen 
> Technology  
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines

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


Mime
View raw message