mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 08:08:16 -05:00
chore: more logs for maybeArchiveState() (#8541)
**Motivation** - this task runs once per epoch so there should be no issue being more verbose on the log Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,9 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
||||
const lastStoredEpoch = computeEpochAtSlot(lastStoredSlot ?? 0);
|
||||
const {archiveStateEpochFrequency} = this.opts;
|
||||
|
||||
const logCtx = {finalizedEpoch: finalized.epoch, lastStoredEpoch, archiveStateEpochFrequency};
|
||||
if (finalized.epoch - lastStoredEpoch >= Math.min(PERSIST_TEMP_STATE_EVERY_EPOCHS, archiveStateEpochFrequency)) {
|
||||
this.logger.verbose("Start archiving state", logCtx);
|
||||
await this.archiveState(finalized, metrics);
|
||||
|
||||
// Only check the current and previous intervals
|
||||
@@ -88,11 +90,13 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy {
|
||||
|
||||
// More logs to investigate the rss spike issue https://github.com/ChainSafe/lodestar/issues/5591
|
||||
this.logger.verbose("Archived state completed", {
|
||||
finalizedEpoch: finalized.epoch,
|
||||
...logCtx,
|
||||
minEpoch,
|
||||
storedStateSlots: storedStateSlots.join(","),
|
||||
statesSlotsToDelete: statesSlotsToDelete.join(","),
|
||||
});
|
||||
} else {
|
||||
this.logger.verbose("Skip archiving state", logCtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user