DIRECTORY AlpineEnvironment USING [UniversalFile], AlpineLog USING [RecordID], AlpTransaction USING [Handle], BackupLog USING [nullRecordID, RecordID], BasicTime USING [GMT], BTree USING [Relation], Rope USING [ROPE]; BackupBTree: CEDAR DEFINITIONS ~ BEGIN Reason: TYPE = {transactionFailure, lockFailure, damagedBTree}; Error: ERROR[why: Reason]; OpenForNormalOperation: PROC [trans: AlpTransaction.Handle, btreeFile: AlpineEnvironment.UniversalFile, initialize: BOOL _ FALSE]; Commit: PROC []; OpenForRecovery: PROC []; SetFileInfo: PROC [universalFile: AlpineEnvironment.UniversalFile, baseRecord, lastIncrementRecord: BackupLog.RecordID _ BackupLog.nullRecordID, name: Rope.ROPE]; GetFileInfo: PROC [universalFile: AlpineEnvironment.UniversalFile, relation: BTree.Relation _ equal] RETURNS [found: BOOLEAN, baseRecord, lastIncrementRecord, prevBaseRecord: BackupLog.RecordID , name: Rope.ROPE]; DeleteFileInfo: PROC [universalFile: AlpineEnvironment.UniversalFile] RETURNS [found: BOOLEAN]; SetPositionInfo: PROC [logRecord: AlpineLog.RecordID, backupRecord: BackupLog.RecordID]; GetPositionInfo: PROC [] RETURNS [logRecord: AlpineLog.RecordID, backupRecord: BackupLog.RecordID]; SetFullyConsistent: PROC [backupRecord: BackupLog.RecordID, time: BasicTime.GMT]; GetFullyConsistent: PROC RETURNS [backupRecord: BackupLog.RecordID, time: BasicTime.GMT]; END. ΈBackupBTree.mesa Carl Hauser, November 21, 1985 3:06:34 pm PST transactionFailure => client should re-open the BackupBTree and start processing from the positions returned by GetPositionInfo lockFailure => client programming error: no other transactions should be manipulating the file containing the BackupBTree. damagedBTree => BTree package detected an error in the state of the btree. If you're lucky, aborting the transaction will fix it. If not, well ... Prepares the database for reading and writing by the backup process. Commits all activity since previous commit or open. In the normal case the transaction remains valid for further work. Prepares the database for reading during recovery. SetFileInfo records baseRecord and lastIncrementRecord in the database under the following interpretation: SELECT TRUE FROM baseRecord = nullRecord AND lastIncrementRecord = nullRecord => update both to nullRecord. baseRecord = nullRecord AND lastIncrementRecord # nullRecord => update only lastIncrementRecord baseRecord # nullRecord AND lastIncrementRecord = nullRecord => update only baseRecord baseRecord # nullRecord AND lastIncrementRecord # nullRecord => update both. END GetFileInfo returns the recorded information for the first file matching universalFile according to relation. DeleteFileInfo removes the entry for the universalFile from the BTree. Remember the progress of the backup process. Retrieve progress of the backup process. Κ&˜code™K™-—K˜šΟk ˜ Jšœœ˜(Jšœ œ ˜Jšœœ ˜Jšœ œ˜)Jšœ œœ˜Jšœœ ˜Jšœœœ˜—J˜šΠbl œœ˜Kšœ˜—K˜šœœ3˜?Kšœ™Kšœz™zKšœ”™”K™—Kšœœ˜K˜šΟnœœXœœ˜‚K™DK™—šŸœœ˜K™w—K™šŸœœ˜K™2—K™šŸ œœ‹œ˜’Kšœk™kšœœ™Kšœœ?™ZKšœœD™_Kšœœ;™VKšœœ1™LKšœ™——K˜š Ÿ œœTœ œSœ˜ΥKšœm™m—K™šŸœ2œ œ˜_KšœF™F—K˜šŸœœC˜XK™,—K˜šŸœœœC˜cK™(—K™KšŸœœ4œ˜QK˜KšŸœœœ4œ˜YK˜Kšœ˜—…—\ :