rqlite icon indicating copy to clipboard operation
rqlite copied to clipboard

Execute Full Snapshot if database file is newer than last snapshot

Open otoolep opened this issue 1 year ago • 0 comments

This would protect against some user actions breaking rqlite. Today rqlite performs a full snapshot if the FullNeeded() returns true. This check could be enhanced to also check if the SQLite file managed by rqlite (not the WAL file!) has changed since the last Snapshot was executed. If it has it implies something altered the SQLite file without going through the Raft system.

This invalidates all existing snapshots, so the way to fix this is to generate a full snapshot on the next Snapshot cycle. This would result in a burst of disk IO, but is better than breaking rqlite.

otoolep avatar Jan 19 '24 01:01 otoolep