tursodatabase / libsql

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

`.dump` fails if the request is sent to replica #1519

Open avinassh opened 4 months ago

avinassh commented 4 months ago

Recently, a user tried to take an export, but the database panicked. The logs pointed to an unwrap here: https://github.com/tursodatabase/libsql/blob/f66dcf794887834810f36f9f6d6e6094c1fc5aa0/libsql-server/src/http/user/dump.rs#L93-L95

As a workround, user was able to take the export by force connecting to primary and calling .dump

first reported in discord: https://discord.com/channels/933071162680958986/933071163184283651/1256427537328767009

MarinPostma commented 4 months ago

I think replicas should proxy the call to the primary