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 Is there any means to get the size of a log record?
Date Tue, 28 Feb 2006 21:31:11 GMT
I am trying to do some statistics to estimate recovery speed.
I can get how many log records the recovery process scaned
during the recovery and how long the recovery takes.The recovery
speed I got so far is something like

X log records/second

But, to use the recovery speed to schedule the checkpoint,
I need it likes

X KB/second

I looked into the org.apache.derby.impl.store.raw.log.LogToFile.java .
The checkpoint is trigger in the flush(long fileNumber, long wherePosition)
function. The condition to trigger a checkpoint is :

if ((logWrittenFromLastCheckPoint + potentialLastFlush) > checkpointInterval 
?checkpointDaemon != null && !checkpointDaemonCalled && !inLogSwitch)

logWrittenFromLastCheckPoint, potentialLastFlush and?checkpointInterval
are in size (X bytes), so, I need the revovery speed in size (e.g. X 
In another word, I want to know how much (KB) log the recovery process
scaned during recovery. I refered to
it says the log record wrapper keeps the length of the log record.
I checked the source code and found the length of the log record
is only used in the getNextRecordBackward() and getNextRecordForward()
functions in org.apache.derby.impl.store.raw.log.Scan.java. I can't
get it outside those functions. Anyone can give me some suggestions to
solve the problem?



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