public class LocalUtilizationTracker extends BaseUtilizationTracker
The countNewLogEntry, countObsoleteNode and countObsoleteNodeInexact methods may be called without taking the log write latch. Totals and offset are accumulated locally in this object only, not in DatabaseImpl objects.
When finished with this object, its information should be added to the Environment's UtilizationTracker and DatabaseImpl objects by calling transferToUtilizationTracker under the log write latch. This is done in the Checkpointer, Evictor and INCompressor by calling UtilizationProfile.flushLocalTracker which calls LogManager.transferToUtilizationTracker which calls BaseLocalUtilizationTracker.transferToUtilizationTracker.
| Constructor and Description |
|---|
LocalUtilizationTracker(EnvironmentImpl env) |
| Modifier and Type | Method and Description |
|---|---|
void |
countObsoleteNode(long lsn,
LogEntryType type,
int size)
Counts a node that has become obsolete and tracks the LSN offset, if
non-zero, to avoid a lookup during cleaning.
|
void |
countObsoleteNodeInexact(long lsn,
LogEntryType type,
int size)
Counts as countObsoleteNode does, but since the LSN may be inexact, does
not track the obsolete LSN offset.
|
countObsoleteDb, getEnvironment, getTrackedFile, getTrackedFiles, isLNType, trackObsoleteInfo, transferToUtilizationTrackerpublic LocalUtilizationTracker(EnvironmentImpl env)
public void countObsoleteNode(long lsn,
LogEntryType type,
int size)
A zero LSN offset is used as a special value when obsolete offset tracking is not desired. [#15365] The file header entry (at offset zero) is never counted as obsolete, it is assumed to be obsolete by the cleaner.
This method should only be called for LNs and INs (i.e, only for nodes). If type is null we assume it is an LN.
public void countObsoleteNodeInexact(long lsn,
LogEntryType type,
int size)
This method should only be called for LNs and INs (i.e, only for nodes). If type is null we assume it is an LN.
Copyright © 2024. All rights reserved.