foundationdb
foundationdb copied to clipboard
Incorporate upstream improvements to SQLite B-Tree code
The ssd
storage engine uses SQLite's btree code, imported many years ago, for its property of excellent testability. As many years have passed, further development has occurred upstream, which we've never included back into FDB. To further complicate the issue, we've done our own improvements to the SQLite code, to add checksumming and improve the cleanup behaviors of the code.
I've done a comparison of our btree.c vs the most recent release, and it looks like there were two major changes to the code. The first looks like something to allow the page cache to be shared between multiple processes, which would bring us no benefit to include. The second is detecting and handling corrupted SQLite databases better. This is superior to our own modifications here, because simulation only corrupts things we modify, and there are some changes to handle some of the fixed contents that we never change (like the page size recorded in the database).
It's possible that there's other useful changes, as I didn't compare any files outside of btree.c