Fixed WAL gc age bug

master v0.7.1
jdl 2023-12-05 09:54:41 +01:00
parent b251368b09
commit 875957f662
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ func (rep *Replicator) runWALGC() {
select {
case <-ticker.C:
state := rep.getState()
before := time.Now().Unix() - rep.conf.WALSegMaxAgeSec
before := time.Now().Unix() - rep.conf.WALSegGCAgeSec
if err := rep.wal.DeleteBefore(before, state.SeqNum); err != nil {
log.Printf("[WAL-GC] failed to delete wal segments: %v", err)
}