fix: actually store the queried timestamp in the struct
parent
04f2f80a06
commit
2c6a7201ef
|
@ -112,11 +112,11 @@ func (m *Mirror) LastRecordTimestamp(ctx context.Context) (time.Time, error) {
|
||||||
|
|
||||||
m.mu.Lock()
|
m.mu.Lock()
|
||||||
defer m.mu.Unlock()
|
defer m.mu.Unlock()
|
||||||
if t.IsZero() {
|
if m.lastRecordTimestamp.IsZero() {
|
||||||
t = dbTimestamp
|
m.lastRecordTimestamp = dbTimestamp
|
||||||
}
|
}
|
||||||
if t.After(dbTimestamp) {
|
if m.lastRecordTimestamp.After(dbTimestamp) {
|
||||||
return t, nil
|
return m.lastRecordTimestamp, nil
|
||||||
}
|
}
|
||||||
return dbTimestamp, nil
|
return dbTimestamp, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue