DIRECTORY ConstArith, YggDID; YggInternal: DEFINITIONS = BEGIN FileHandle: TYPE = REF FileHandleRep; -- same as YggFile.FileHandle FileHandleRep: TYPE; Document: TYPE = REF DocumentRep; -- same as DIDMap.Document DocumentRep: TYPE; OpenDoc: TYPE = REF OpenDocRep; -- same as YggOpenDoc.OpenDoc OpenDocRep: TYPE; FPMFileHandle: TYPE = REF FPMFileObject; -- base type of FilePageMgr.FPMFileHandle FPMFileObject: TYPE; LockID: TYPE = RECORD [entity: UniversalID, subEntity: ID2, subSubEntity: LockSubID, did: YggDID.DID]; UniversalID: TYPE [3*SIZE[CARD32]]; -- can be compressed someday by implementing a separate map ID2: TYPE [SIZE[CARD32]]; -- large enough to hold file ID within volume LockSubID: TYPE [2*SIZE[CARD32]]; -- large enough to hold [tag, page number within file] nullLockIDRep: ARRAY [0..SIZE[LockID]/SIZE[CARD32]) OF CARD32 = [0,0,0,0,0,0,0]; nullLockID: LockID = LOOPHOLE[nullLockIDRep]; LockTransHeader: TYPE = REF LockTransHeaderObject; LockTransHeaderObject: TYPE; LogRecordID: TYPE = ConstArith.Const; nullLogRecordID, firstRecordID: LogRecordID = [zero, 0, 0]; lastRecordID: LogRecordID = [positive, LAST[CARD], LAST[CARD]]; LogRecordType: TYPE = MACHINE DEPENDENT { --ControlRecord-- noop (0), checkpointBegin, checkpointComplete, coordinatorBegin (10), coordinatorRegisterWorker, coordinatorCollecting, coordinatorCompleting, coordinatorComplete, workerBegin (30), workerReady, workerCompleting, workerComplete, --FileRecord-- writePages (100), setSize, create, delete, lock, --Reserved-- reserved (200), (LAST[INTEGER]) }; -- s/b LAST[CARDINAL] but for compiler bug ControlRecord: TYPE = LogRecordType [noop..writePages); FileRecord: TYPE = LogRecordType [writePages..reserved); LogRecordPhaseType: TYPE = { analysis, -- only needed in analysis phase (e.g., transaction commit) redo, -- only needed in redo phase (e.g., writePages) undo, -- only needed in undo phase redoUndo, -- needed in both redo and undo phases other -- other records (e. g., checkpointBegin) }; LogMap: TYPE = REF LogMapRep; -- base type of LogMap.LogMap LogMapRep: TYPE; TransHandle: TYPE = REF TransObject; -- Base type of TransactionMap.Handle TransObject: TYPE; WorkerOutcome: TYPE = {abort, readOnly, commit}; Difficulty: TYPE = {zero, normal, hard}; WorkLevel: TYPE = Difficulty [normal .. hard]; TransState: TYPE = {committed, aborted, ready}; CoordinatorHandle: TYPE = REF CoordinatorObject; CoordinatorObject: TYPE; END. vYggInternal.mesa Copyright Σ 1987, 1988 by Xerox Corporation. All rights reserved. Last edited by: MBrown on January 31, 1984 11:44:24 am PST Kolling on October 28, 1983 2:13 pm Taft on April 10, 1983 5:11 pm Hauser, March 7, 1985 2:18:51 pm PST Carl Hauser, July 12, 1985 9:59:34 am PDT Bob Hagmann May 12, 1988 8:18:42 am PDT File FilePageMgr Lock Log Include lots of spares so that new LogRecordTypes can be introduced without invalidating existing log files. If you change these, keep the corresponding subranges (below) up-to-date. Identifies during which phase of recovery the record is needed. LogMap Transaction Κl– "cedar" style˜šœ™IcodešœB™B—šœ™Jšœ*™*Jšœ#™#Jšœ™K™$K™)K™'—J˜šΟk ˜ Jšœ ˜ Jšœ˜—J˜Iunitšœ  œ˜ J˜J˜šœ™J˜Jšœ œœΟc˜DJšœœ˜J˜Jšœ œœž˜=Jšœ œ˜J˜Jšœ œœž˜>Jšœ œ˜J˜J˜—šœ ™ J˜Jšœœœž)˜SJšœœ˜J˜—šœ™J˜JšœœœQ˜fJšœ œœœž;˜_Jšœœœœž-˜GJšœ œœœž6˜XJ˜Jš œœœ œœœœ˜PJšœœ˜-J˜Jšœœœ˜2Jšœœ˜—J˜šœ™K˜Kšœ œ˜%Kšœ;˜;š œ'œœœœ˜?K˜—šœœœ œ˜)Jšœ·™·Kšžœε˜φKšžœ1˜?Kš ž œœœžΠckžŸž˜ZK˜—Kšœœ$˜7Kšœ œ(˜8K˜šœœ˜Kšœ@™@Kšœ ž<˜FKšœž0˜6Kšœž˜#Kšœ ž'˜1Kšœž*˜0Kšœ˜—K˜—J˜J˜Jšœ™˜Kšœœœ ž˜