<> <> <> DIRECTORY OldAlpineDebug USING[AccessFailed, LockFailed, OperationFailed, StaticallyInvalid, Unknown], AlpineDebug, AlpineEnvironment USING[Conversation, OwnerName, OwnerPropertySet, OwnerPropertyValuePair, PageCount, TransID, UnknownType, UniversalFile, VolumeGroupID], OldAlpineEnvironment; DebugActionsImpl: --CEDAR-- PROGRAM IMPORTS AlpineDebug, AD: OldAlpineDebug EXPORTS OldAlpineDebug = BEGIN OPEN AE: AlpineEnvironment, OAE: OldAlpineEnvironment; ReadOwnerFileHeader: PUBLIC PROCEDURE[conversation: OAE.Conversation, transID: OAE.TransID, volumeGroupID: OAE.VolumeGroupID] RETURNS[version: NAT, recordedVolGroupID: OAE.VolumeGroupID, totalQuota, quotaLeft: OAE.PageCount, numberOfOwners, numberOfOwnerSlotsInUse, maxNumberOfOwnersAllowed: NAT] = BEGIN -- non system-fatal errors: AccessFailed[alpineWheel], LockFailed[timeout], Unknown[transID, volumeGroupID]. Work: PROC ~ { [version, recordedVolGroupID, totalQuota, quotaLeft, numberOfOwners, numberOfOwnerSlotsInUse, maxNumberOfOwnersAllowed] _ AlpineDebug.ReadOwnerFileHeader[conversation, transID, volumeGroupID]; }; DoWork[Work]; END; ReadNextOwnerRecord: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, contRecNum: INT, desiredProperties: AE.OwnerPropertySet] RETURNS[entryEmpty, entryValid: BOOLEAN, owner: AE.OwnerName, properties: LIST OF AE.OwnerPropertyValuePair, nextContRecNum: INT] = BEGIN -- non system-fatal errors: AccessFailed[alpineWheel], LockFailed[timeout], StaticallyInvalid, Unknown[transID, volumeGroupID]. Work: PROC ~ { [entryEmpty, entryValid, owner, properties, nextContRecNum] _ AlpineDebug.ReadNextOwnerRecord[conversation, transID, volumeGroupID, contRecNum, desiredProperties]; }; DoWork[Work]; END; ChangeSpaceForOwner: PUBLIC PROCEDURE[conversation: AE.Conversation, transID: AE.TransID, volumeGroupID: AE.VolumeGroupID, owner: AE.OwnerName, nPages: AE.PageCount] = BEGIN -- non system-fatal errors: AccessFailed[alpineWheel], LockFailed[timeout], OperationFailed[quotaExceeded], StaticallyInvalid, Unknown[owner, transID, volumeGroupID]. Work: PROC ~ { AlpineDebug.ChangeSpaceForOwner[conversation, transID, volumeGroupID, owner, nPages]; }; DoWork[Work]; END; ReadDBUniversalFile: PUBLIC PROCEDURE[volumeGroupID: OAE.VolumeGroupID] RETURNS [dBID: OAE.UniversalFile] = BEGIN -- non system-fatal errors: Unknown[volumeGroupID]. Work: PROC ~ { dBID _ AlpineDebug.ReadDBUniversalFile[volumeGroupID]; }; DoWork[Work]; END; ReportAccessCacheStats: PUBLIC PROCEDURE RETURNS [nCacheEntries: NAT, statsCacheHit, statsGrapevineAuthorized, statsGrapevineNotAuthorized, statsRegServersDown, statsIndivGrapeNotAuthorized: INT] = BEGIN -- non system fatal errors: none. Work: PROC ~ { [nCacheEntries, statsCacheHit, statsGrapevineAuthorized, statsGrapevineNotAuthorized, statsRegServersDown, statsIndivGrapeNotAuthorized] _ AlpineDebug.ReportAccessCacheStats[]; }; DoWork[Work]; END; ReportAccessVolatileStats: PUBLIC PROCEDURE RETURNS [nRegs, nInits, nUnRegs, nReorganizes, nEnumAlls, nAllocReqsWin, nAllocReqsLose, nDeallocReqs, nRemoveOwner, nEnumFindWin, nEnumFindLose, nSetEnums, nActions, nPhaseOnes, nPhaseTwos, nAborts: LONG CARDINAL] = BEGIN -- non system-fatal errors: none. Work: PROC ~ { [nRegs, nInits, nUnRegs, nReorganizes, nEnumAlls, nAllocReqsWin, nAllocReqsLose, nDeallocReqs, nRemoveOwner, nEnumFindWin, nEnumFindLose, nSetEnums, nActions, nPhaseOnes, nPhaseTwos, nAborts] _ AlpineDebug.ReportAccessVolatileStats[]; }; DoWork[Work]; END; CrashSystem: PUBLIC PROCEDURE [conversation: AE.Conversation, transID: AE.TransID] = BEGIN -- non system-fatal errors: AccessFailed[alpineWheel], Unknown[transID]. Work: PROC ~ { AlpineDebug.CrashSystem[conversation, transID]; }; DoWork[Work]; END; DoWork: PROC [work: PROC] RETURNS [] ~ { accessReason: OldAlpineEnvironment.NeededAccess; lockReason: OldAlpineEnvironment.LockFailure; operationReason: OldAlpineEnvironment.OperationFailure; unknownWhat: OldAlpineEnvironment.UnknownType; { ENABLE { AlpineDebug.AccessFailed => {accessReason _ missingAccess; GOTO accessFailed}; AlpineDebug.LockFailed => { lockReason _ SELECT why FROM conflict, cantConvert => conflict, timeout => timeout, ENDCASE => ERROR; GOTO lockFailed}; AlpineDebug.OperationFailed => {operationReason _ why; GOTO operationFailed}; AlpineDebug.StaticallyInvalid => {GOTO staticallyInvalid}; AlpineDebug.Unknown => {unknownWhat _ what; GOTO unknown}; }; work[]; EXITS accessFailed => ERROR AD.AccessFailed[accessReason]; lockFailed => ERROR AD.LockFailed[lockReason]; operationFailed => ERROR AD.OperationFailed[operationReason]; staticallyInvalid => ERROR AD.StaticallyInvalid; unknown => ERROR AD.Unknown[unknownWhat]; }; }; END. CHANGE LOG <<>> <<>> <<>>