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



Reply via email to