tursodatabase / tursodatabase/libsql
`.dump` fails if the request is sent to replica
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in libsql-server/src/http/user/dump.rs around lines 93-95 and trace the unwrap reached when .dump is sent to a replica. Reproduce the export request against a replica, then verify that the request no longer causes a database panic and that the export behavior is handled consistently with the primary workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100