1
0
Fork 0

Don't log incremental Persist times

master
Philip O'Toole 8 months ago
parent 5a1ef0d6b4
commit d383e865cb

@ -4,6 +4,7 @@ The releases changes the default logging level for the Raft subsystem from `INFO
- [PR #1607](https://github.com/rqlite/rqlite/pull/1607): Remove use of deprecated `ioutil`.
- [PR #1608](https://github.com/rqlite/rqlite/pull/1608): Always close the FSM Snapshot.
- [PR #1610](https://github.com/rqlite/rqlite/pull/1610): Change Raft default log level to `WARN`.
- [PR #1611](https://github.com/rqlite/rqlite/pull/1611): Don't log incremental Raft snapshots.
## 8.16.6 (January 16th 2024)
### Implementation changes and bug fixes

@ -48,7 +48,9 @@ func (f *FSMSnapshot) Persist(sink raft.SnapshotSink) (retError error) {
if retError == nil {
dur := time.Since(startT)
stats.Get(snapshotPersistDuration).(*expvar.Int).Set(dur.Milliseconds())
f.logger.Printf("persisted snapshot %s in %s", sink.ID(), time.Since(startT))
if f.logger != nil {
f.logger.Printf("persisted snapshot %s in %s", sink.ID(), dur)
}
}
}()
return f.FSMSnapshot.Persist(sink)

@ -1826,13 +1826,14 @@ func (s *Store) fsmSnapshot() (fSnap raft.FSMSnapshot, retErr error) {
stats.Add(numSnapshots, 1)
dur := time.Since(startT)
stats.Get(snapshotCreateDuration).(*expvar.Int).Set(dur.Milliseconds())
fs := FSMSnapshot{
FSMSnapshot: fsmSnapshot,
}
if fullNeeded {
s.logger.Printf("%s snapshot created in %s on node ID %s", fPLog, dur, s.raftID)
fs.logger = s.logger
}
return &FSMSnapshot{
FSMSnapshot: fsmSnapshot,
logger: s.logger,
}, nil
return &fs, nil
}
// fsmRestore restores the node to a previous state. The Hashicorp docs state this

Loading…
Cancel
Save