tursodatabase / tursodatabase/libsql
WAL sync fails after program is terminated
Open
Nobody has claimed this yet.
bug
offline writes
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
If you run a long sync and press Ctrl-C, you get the following error on subsequent sync:
thread 'main' panicked at libsql/examples/sync_stress.rs:49:21:
called `Result::unwrap()` on an `Err` value: Sync(InvalidPushFrameConflict(1, 222))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The info file seems to be the culprit here because durable frame number is zero:
{"hash":2473653909,"version":0,"durable_frame_num":0,"generation":17}
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
Reproduce the interruption scenario with libsql/examples/sync_stress.rs and inspect the failure reported at line 49. Start by examining how the info file's durable_frame_num=0 interacts with WAL sync after Ctrl-C; done means a subsequent sync no longer returns InvalidPushFrameConflict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100