public class RecoveryUtilizationTracker extends BaseUtilizationTracker
Per-database information is keyed by DatabaseId because the DatabaseImpl is not always available during recovery. In fact this is the only reason that a "local" tracker is used during recovery -- to avoid requiring that the DatabaseImpl is available, which is necessary to use the "global" UtilizationTracker. There is no requirement to accumulate totals locally, since recovery is single threaded.
When finished with this object, its information should be added to the Environment's UtilizationTracker and DatabaseImpl objects by calling transferToUtilizationTracker. This is done at the end of recovery, just prior to the checkpoint. It does not have to be done under the log write latch, since recovery is single threaded.
| Constructor and Description |
|---|
RecoveryUtilizationTracker(EnvironmentImpl env) |
| Modifier and Type | Method and Description |
|---|---|
void |
countNewLogEntry(long lsn,
LogEntryType type,
int size)
Counts the addition of all new log entries including LNs.
|
void |
countObsoleteIfUncounted(long oldLsn,
long newLsn,
LogEntryType type,
int size,
boolean trackOffset)
Counts the oldLsn of a node obsolete if it has not already been counted
at the point of lsn in the log.
|
void |
countObsoleteUnconditional(long lsn,
LogEntryType type,
int size,
boolean trackOffset)
Counts the LSN of a node obsolete unconditionally.
|
void |
resetFileInfo(long fileNum)
Clears all accmulated utilization info for the given file.
|
void |
saveLastLoggedFileSummaryLN(long fileNum,
long lsn)
Saves the LSN of the last logged FileSummaryLN.
|
countObsoleteDb, getEnvironment, getTrackedFile, getTrackedFiles, isLNType, trackObsoleteInfo, transferToUtilizationTrackerpublic RecoveryUtilizationTracker(EnvironmentImpl env)
public void saveLastLoggedFileSummaryLN(long fileNum,
long lsn)
public void countNewLogEntry(long lsn,
LogEntryType type,
int size)
public void countObsoleteUnconditional(long lsn,
LogEntryType type,
int size,
boolean trackOffset)
public void countObsoleteIfUncounted(long oldLsn,
long newLsn,
LogEntryType type,
int size,
boolean trackOffset)
public void resetFileInfo(long fileNum)
Copyright © 2024. All rights reserved.