sqlite icon indicating copy to clipboard operation
sqlite copied to clipboard

Support sqlite3_db_cacheflush

Open mitar opened this issue 1 year ago • 5 comments

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.

mitar avatar Jan 02 '24 23:01 mitar

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

anacrolix avatar Jan 03 '24 00:01 anacrolix

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.

mitar avatar Jan 03 '24 00:01 mitar

@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)?

anacrolix avatar Jan 03 '24 00:01 anacrolix

@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.

mitar avatar Jan 03 '24 08:01 mitar

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.

anacrolix avatar Jan 03 '24 10:01 anacrolix