crawshaw / sqlite

Go SQLite3 driver
ISC License
561 stars 67 forks source link

Support sqlite3_db_cacheflush #145

Open mitar opened 6 months ago

mitar commented 6 months ago

It would be great to be able to force flushing cache to disk using sqlite3_db_cacheflush, but it does not seem to be supported.

anacrolix commented 6 months ago

I'm curious what your use case is for this, can you share?

mitar commented 6 months ago

I am writing a benchmarking tool to compare various key/value stores and I am also using Sqlite as such. And I would like to be able to force flush at various points during the benchmark so that I can measure how much data does it consume on the disk at that point. Many other key/value stores support some type of "sync" or "flush" operation.

anacrolix commented 6 months ago

@mitar I don't suppose you'd be interested in benchmarking https://github.com/anacrolix/possum? Are you doing cache implementations too (or you could just switch off the cache part)?

mitar commented 6 months ago

@anacrolix This looks great and I was also wondering why people do not use FS for key/value more, especially because I am also interested in supporting large values. But currently I am focusing on Go ecosystem, so Possum (written in Rust) seems to be out of scope.

anacrolix commented 6 months ago

It has first class Go bindings as I actually use it from Go. This is off topic to this repo, so I'll email you directly.