losfair / mvsqlite

Distributed, MVCC SQLite that runs on FoundationDB.
https://github.com/losfair/mvsqlite/wiki
Apache License 2.0
1.36k stars 39 forks source link

Custom freelist handling #57

Open losfair opened 1 year ago

losfair commented 1 year ago

SQLite manages an on-disk data structure called "freelist". The freelist is used to track free pages in the database.

The head of the freelist is stored in page 0. Each page allocation/release will write to page 0, and conflict with every other concurrent transaction. This is not good for concurrency.

We should emulate a freelist instead.