1
0
Fork 0

Don't check for WAL size if 0 interval

master
Philip O'Toole 9 months ago
parent 0e2c3070e6
commit db00fb3c99

@ -1960,6 +1960,9 @@ func (s *Store) Snapshot(n uint64) (retError error) {
// runWALSnapshotting runs the periodic check to see if a snapshot should be // runWALSnapshotting runs the periodic check to see if a snapshot should be
// triggered due to WAL size. // triggered due to WAL size.
func (s *Store) runWALSnapshotting() (closeCh, doneCh chan struct{}) { func (s *Store) runWALSnapshotting() (closeCh, doneCh chan struct{}) {
if s.SnapshotInterval <= 0 {
return nil, nil
}
closeCh = make(chan struct{}) closeCh = make(chan struct{})
doneCh = make(chan struct{}) doneCh = make(chan struct{})
ticker := time.NewTicker(s.SnapshotInterval) ticker := time.NewTicker(s.SnapshotInterval)

Loading…
Cancel
Save