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

Safety of journal_mode=off #87

Open
losfair opened this issue Oct 17, 2022 · 0 comments
Open

Safety of journal_mode=off #87

losfair opened this issue Oct 17, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@losfair
Copy link
Owner

losfair commented Oct 17, 2022

mvSQLite does not need SQLite's journaling mechanism. Currently we emulate an in-memory journal to make applications happy, but this is a waste of memory. We need to figure out a way to disable journaling, safely.

There is journal_mode=off, but SQLite's documentation states:

The OFF journaling mode disables the atomic commit and rollback capabilities of SQLite. The ROLLBACK command no longer works; it behaves in an undefined way.

So a questions is that... how undefined is ROLLBACK with journal_mode=off? If it just corrupts the "disk" image, it's fine. We listen on the SQLITE_FCNTL_COMMIT_PHASETWO fcntl callback so we know whether a transaction is really committed. However, if it also corrupts memory, that would be very bad.

@losfair losfair changed the title Make journal_mode=off work Safety of journal_mode=off Oct 17, 2022
@losfair losfair added the help wanted Extra attention is needed label Oct 17, 2022
@losfair losfair pinned this issue Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant