db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dibyendu Majumdar <dibye...@mazumdar.demon.co.uk>
Subject Re: Derby architecture/design documents
Date Mon, 07 Feb 2005 21:16:06 GMT
> RPost wrote:
>>1. Where in the format does a log record indicate the type of record (redo,
>>undo, etc)?
> 
Mike Matrigali wrote:
> log records are not of type redo, undo, ...   Redo is the recovery phase
> and during redo you ask every log record to perform redo.  And during
> undo you ask it to do undo.

Mike,

Is my understanding correct that the type (Undoable, for example) of the 
log record is part of the Loggable hierarchy, and that Loggable objects 
are serialized as user data in the LogRecord, and de-serialized back as 
objects when they are being read? Therefore, the correct type of 
Loggable object is automatically created? Relevant code from LogRecord 
given below:

		Object obj = input.readObject();

		if (SanityManager.DEBUG) {
			if ( ! (obj instanceof Loggable))
				SanityManager.THROWASSERT(
					"log record not getting expected Loggable: got : " +
					obj.getClass().getName());
		}
		op = (Loggable)obj;


Regards

Dibyendu


Mime
View raw message