Skip to content

Commit 7a56f2e

Browse files
author
Jeff Yanta
committed
Fix Geyser backup Timelock metrics
1 parent f259661 commit 7a56f2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/code/async/geyser/backup.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ func (p *service) backupTimelockStateWorker(serviceCtx context.Context, state ti
6060
if err == timelock.ErrTimelockNotFound {
6161
p.metricStatusLock.Lock()
6262
copiedTs := oldestRecordTs
63-
p.oldestTimelockRecord = &copiedTs
63+
if p.oldestTimelockRecord == nil || p.oldestTimelockRecord.After(copiedTs) {
64+
p.oldestTimelockRecord = &copiedTs
65+
}
6466
p.metricStatusLock.Unlock()
6567

6668
cursor = query.EmptyCursor

0 commit comments

Comments
 (0)