I think putting this information somewhere would be good, not sure
what way would be best. javadoc tries to do some of it. Here is
the high level:
With Derby start with the "module", derby is made up of a set of modules
like: language, store, access, log, data. So for the logging system
there is (iapi is the java interface side, impl is the implementation side):
opensource/java/engine/org/apache/derby/iapi/store/raw/log/LogFactory.java
the java interface for logging system module
opensource/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
the implmentation of the LogFactory.java, also implmenting Module,
this is the one with recovery code.
Quick note on other files in the impl/store/raw/log directory - comments
should be in the files:
CheckpointOperation.java - code to implment checkpoint log record
D_FlushedScan.java - debugging file
D_LogToFile.java - debugging file
FileLogger.java - stuff dealing with putting log records to disk
FlushedScan.java - stuff dealing with scanning the log file
FlushedScanHandle.java - more stuff dealing with scanning the log file
LogAccessFile.java - lowest level putting log records to disk
LogAccessFileBuffer.java - utility for LogAccessFile
LogCounter.java - log sequence number
LogRecord.java - log record
ReadOnly.java - an alternate read only implementation of LogFactory
Scan.java - more scan log file stuff
StreamLogScan.java - more scan log file stuff
RPost wrote:
> re logformats.xml
>
> I'm know I'm dating myself but in I Love Lucy here's where Ricky would say:
>
> "Lucy, you got some splainin' to do!"
>
> The last line of this xml file is:
>
> Loggable op - the log operation
>
>
> At some point could we get an explanation as to how all of the log related
> *.java files are pieced together?
>
> These files are difficult to piece together out of context because they are
> a series of interfaces, abstract classes and implementation. I haven't been
> able to sort it out.
>
> For example:
>
> public final class DeleteOperation extends LogicalPageOperation
>
> public abstract class LogicalPageOperation extends PageBasicOperation
> implements LogicalUndoable
>
> public abstract class PageBasicOperation implements Loggable,
> RePreparable
>
> public interface Loggable extends Formatable {
>
> 1. How do all of these pieces fit together?
>
> 2. What, exactly, gets written to the log record for a delete operation?
> That is, what is 'Loggable op' for this case?
>
> 3. What are the set of implemented classes that write to the log? The
> DeleteOperation class appears to be one, what are the others?
>
>
>