tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Use `WAL` as default everywhere #1553

Open avinassh opened 2 months ago

avinassh commented 2 months ago

Currently, Turso (the platform), libsql-sever, and embedded replicas use WAL mode and it is the only mode supported. However libsql drivers don't have WAL mode as default. Let's change that to use WAL everywhere.

reported here: https://discord.com/channels/933071162680958986/1154725980183732224/1261642078694150144

imskr commented 2 months ago

Can I work on this? @avinassh please assign me

avinassh commented 2 months ago

@imskr sure! feel free to work on it

I would start with the Rust driver first: https://github.com/tursodatabase/libsql/tree/main/libsql

imskr commented 2 months ago

Thanks @avinassh I was looking to set

PRAGMA journal_mode = wal

In the rust driver I don't see journal_mode, Can you point me to the right place?

imskr commented 2 months ago

Any pointer on this @avinassh ?

avinassh commented 2 months ago

I don't think it is that simple as we don't set any journal mode and use the defaults. I would probably find the methods where we are creating new connections and setup the journal mode appropriately.