From db00fb3c9915512e8bd213d014dd809d57a2acb0 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Wed, 27 Dec 2023 11:26:02 -0500 Subject: [PATCH] Don't check for WAL size if 0 interval --- store/store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/store/store.go b/store/store.go index 72612af2..b1f46a3e 100644 --- a/store/store.go +++ b/store/store.go @@ -1960,6 +1960,9 @@ func (s *Store) Snapshot(n uint64) (retError error) { // runWALSnapshotting runs the periodic check to see if a snapshot should be // triggered due to WAL size. func (s *Store) runWALSnapshotting() (closeCh, doneCh chan struct{}) { + if s.SnapshotInterval <= 0 { + return nil, nil + } closeCh = make(chan struct{}) doneCh = make(chan struct{}) ticker := time.NewTicker(s.SnapshotInterval)