Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Transactions start with the creation of the journal file and end when it's unlinked so there's some "pattern matching" but it's not terribly complicated. Once the file is unlinked, LiteFS can read and verify the journal and pull the change set of pages from the database file.

Litestream interacts with the SQLite API for locking but it uses a regular file descriptor to read the WAL. It has to do similar parsing of pages but it's a bit more complicated since it needs to re-verify its position every time it reads from the WAL.



I am under the impression that if you are in the WAL mode, there is no rollback journal created?


Yes, there is no rollback journal in WAL mode, but the WAL is its own file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: