Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute Full Snapshot if database file is newer than last snapshot #1613

Open
otoolep opened this issue Jan 19, 2024 · 0 comments
Open

Execute Full Snapshot if database file is newer than last snapshot #1613

otoolep opened this issue Jan 19, 2024 · 0 comments

Comments

@otoolep
Copy link
Member

otoolep commented Jan 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant