1
0
Fork 0

Integrate Scanner Bytes

master
Philip O'Toole 8 months ago
parent b84a9e228c
commit 3f15a89a1d

@ -1,3 +1,7 @@
## 8.18.4 (unreleased)
### Implementation changes and bug fixes
- [PR #1644](https://github.com/rqlite/rqlite/pull/1644): Remove an unnecessary memcpy during Snapshotting.
## 8.18.3 (January 29th 2024)
### Implementation changes and bug fixes
- [PR #1638](https://github.com/rqlite/rqlite/pull/1638): More Snapshotting metrics.

@ -1949,15 +1949,13 @@ func (s *Store) fsmSnapshot() (fSnap raft.FSMSnapshot, retErr error) {
if err != nil {
return nil, err
}
walWr, err := wal.NewWriter(scanner)
walFD.Close() // We need it closed for the next step.
compactedBytes, err := scanner.Bytes()
if err != nil {
return nil, err
}
if _, err := walWr.WriteTo(compactedBuf); err != nil {
return nil, err
}
walFD.Close() // We need it closed for the next step.
stats.Get(snapshotCreateWALCompactDuration).(*expvar.Int).Set(time.Since(compactStartTime).Milliseconds())
compactedBuf = bytes.NewBuffer(compactedBytes)
// Now that we're written a (compacted) copy of the WAL to the Snapshot,
// we can truncate the WAL. We use truncate mode so that the next WAL

Loading…
Cancel
Save