Fix snapshotter initialization and remove initial snapshot on startup
- Remove immediate snapshot when periodic goroutine starts - Fix variable shadowing issue in snapshotter creation - Add debug logging for snapshotter shutdown - Snapshots now only occur after 10 minutes or on shutdown
This commit is contained in:
@@ -115,11 +115,7 @@ func (s *Snapshotter) periodicSnapshot() {
|
||||
ticker := time.NewTicker(snapshotInterval)
|
||||
defer ticker.Stop()
|
||||
|
||||
// Take an initial snapshot
|
||||
if err := s.TakeSnapshot(); err != nil {
|
||||
s.logger.Error("Failed to take initial snapshot", "error", err)
|
||||
}
|
||||
|
||||
// Wait for the first interval before taking any snapshots
|
||||
for {
|
||||
select {
|
||||
case <-s.ctx.Done():
|
||||
|
||||
Reference in New Issue
Block a user