Fixed WAL gc age bug
This commit is contained in:
parent
b251368b09
commit
875957f662
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user