Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Have now implemented a version of this at https://github.com/michalc/sqlite-memory-vfs/blob/74a24ce567...
I think different to yours in two ways:
- If doesn't go via PENDING if it doesn't need to. Not sure what's best really - but since RESERVED can already be skipped in some cases (recovering from a hot-journal) then so far happy with "skipping is a thing", and PENDING is private to the VFS anyway from what I can tell, so nothing else should care I think
- It doesn't do the blocking on PENDING in the lock function, but depends on SQLite's core code doing it via the busy handler/timeout
If you're interested both SQLite's and my memdb VFSes implement safe locking.
Depending on your familiarity with Go, mine maybe easier to follow, or not.
https://github.com/ncruces/go-sqlite3/blob/f1b00a9944730eaa9...