Purpose: Check integrity of the journal file(s)
jrnlist can be either a file path or, if passed by reference, a number-indexed array of file paths, e.g.:
jrnlist(1)=path1, jrnlist(2)=path2, etc.
The file paths in the array should be in chronicle order, that is, path1 and
path2 are assumed to have been created consecutively in the example above.
If it is determined that the files in the given array do not meet that
criterion, a single value 0 is returned (for "Invalid Parameter") and the top
node of the array is set to the number index of the offending path.
Detail: If 1, scan each given journal file forward to locate the last record and verify it is the last record to be expected.
If 2, verify values stored in each record are retrievable.
If SrcDirs is set to 1 and passed by reference, the database directories used in the
specified journal file(s) will be stored in SrcDirs array upon return.
method ClusterStartTime0Get() as %Integer [ Language = objectscript ]
method ClusterStartTimeGet() as %String [ Language = objectscript ]
method EndGet() as %Integer [ Language = objectscript ]
Return the object reference to the record at the given journal location (Address)
classmethod GetSystemGUID(FileName As %String) as %String [ Language = objectscript ]
Get the GUID assigned to this system in the mirror configuration file.
This is used to help people identify which system created the journal file.
Since this comes from the config file, it's possible that this can change over time but its not supposed to.
classmethod IsValidJournal(FileName As %String) as %Status [ Language = objectscript ]
Purpose: Purge old journal files based on criteria given in number of days or backups, taking care not to purge files required for transaction rollbacks or crash recovery.
NDaysOld: journal files must be at least this # of days old to be purged
NBackupsOld: journal files must be older than this # of successive successful backups to be purged
If both parameters are specified, only one criterion has to be met to qualify a journal file for purging (subject to the restriction about rollback and crash recovery).
Note: It is the completion date, rather than the creation date, of a file that must meet the date criterion if specified. Thus, a file may not be OK to purge even though the date in its name appears to meet the date criterion.
classmethod PurgeAll() as %Status [ Language = objectscript ]
Purge all journal files except those required for transaction rollbacks or crash recovery. Warning: Post-backup journal files are not necessarily preserved.
Purpose: Purge the journal file with the given name
Warning: This method does NOT check for open transactions before deleting the journal file.
FilePath: the full path of the journal file to purge
PurgeTimeH: Time of purging in $H format
LogOnly: if 1, skip purging and log the purged file only. Default = 0
classmethod RequiredForClusterRecovery(ByRef FileName As %String, ByRef FileCount As %Integer, SkipSelf As %Boolean = 0) as %Status [ Language = objectscript ]
Return the path of the oldest journal file on each node that is required
for cluster recovery, which includes rolling forward and back transactions.
FileName = # of nodes where journal recovery is required
FileName(csn) = the path of the oldest journal file on node <#csn>
If SkipSelf = 1, skip the node where the method is called (local node is covered by RequiredForRecovery()
classmethod RequiredForRecovery(ByRef FileName As %String, ByRef FileCount As %Integer) as %Status [ Language = objectscript ]
Return the name of the oldest journal file required for crash recovery, which
includes rolling forward and backward transactions.
FileName="" if journaling is disabled, meaning that none is required, as
transactions cannot be rolled forward or backward from a pre-disabling file
classmethod RequiredForRollback(ByRef FileName As %String, ByRef FileCount As %Integer) as %Status [ Language = objectscript ]
Return the path of the oldest journal file containing open transactions.
FileName: the oldest file containing open transactions or current journal file
FileCount: the file counter value assigned to the file
Information on cluster journal files
By default, files are listed in reverse order of time, unless TimeOrder = 1
If FileName is specified, files are listed until FileName is reached (depend on TimeOrder)
If CSN is given, only files belong to the node are listed.
Returns paths of journal files (along with their mirror names if any) that are eligible for purging based on the default or given criteria.
DaysToKeep: How many days of journal files to keep. Use default (current system setting) if left unspecified. If 0, none is purgeable; if <0, all files are purgeable except those required for transaction rollback and crash recovery.