-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Port the Checksum VFS #172
Comments
This VFS raises a few very interesting issues. This VFS needs to detect full page reads/writes, and so needs to be at the very top of the VFS stack: it needs to be the VFS that receives direct (or unmodified) calls to Also, if a file with checksums is updated by any other means, it then looks corrupt to the VFS. So this feature really should be core to the library. Alas, it is not. Still, that's why the loadable extension puts itself at the top of the stack, auto detecting which files have checksums. My current view is to make this core to this wrapper, ensuring files with checksums update them by default, and providing knobs to disable checksums when so desired. But there's more. The encryption VFSes also want to be at top of stack, though they don't strictly need to. We need to fix that by advancing the concept of a “wrapping” VFS. The challenge to solve is to help a rollback/WAL file “find” the corresponding database file of the same type (at the same level of wrapping). Basically that |
The encryption VFSes now tolerate not being at top of stack: go-sqlite3/vfs/adiantum/hbsh.go Line 39 in 21de004
I'm not sure I want to support VFSes implemented in C. In general, it is a goal to allow C extensions to be built in (that gets us I guess I'll punt that complexity until someone asks for RBU or something like that. Footnotes
|
So if this could be done in Go, with the public API, this would be it. |
I decided not to hold 3.47.0 on this any longer, and against coupling the driver too much with it (implementing it in the default VFS, mostly in C, etc). I guess this article, however misguided, kinda changed my mind. The implementation in #176 is sound, though, and works for those who want it. It's not the default VFS, but you can still choose it. It needs to ensure it's the first VFS in the stack when used, but I think that can be done. |
https://sqlite.org/cksumvfs.html
The text was updated successfully, but these errors were encountered: