Fixed WAL gc age bug
This commit is contained in:
parent
b251368b09
commit
875957f662
@ -15,7 +15,7 @@ func (rep *Replicator) runWALGC() {
|
|||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
state := rep.getState()
|
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 {
|
if err := rep.wal.DeleteBefore(before, state.SeqNum); err != nil {
|
||||||
log.Printf("[WAL-GC] failed to delete wal segments: %v", err)
|
log.Printf("[WAL-GC] failed to delete wal segments: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user