tursodatabase / tursodatabase/libsql
Use a virtual WAL conneciton when checkpointing before bottomless
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
Following this FIXME:
https://github.com/tursodatabase/libsql/blob/0595417845ba73b0fc6e93839e6f301d61b9dfbb/libsql-server/src/replication/primary/logger.rs#L714-L716
Right now, our code uses a regular WAL connection for checkpointing the db file before initializing bottomless replication. We should never use non-virtual-WAL connections in our code, so it's a bug. It also needs a careful fix, because we need to keep the initialization order correct, and the issue is that this checkpointing code needs to run before bottomless replication is initialized, and our virtual WAL is only created after bottomless replication is initialized, so we need to break a dependency cycle.
Discussed in #834
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 with the FIXME in libsql-server/src/replication/primary/logger.rs at lines 714-716, then review the initialization-order discussion in issue #834. The change is done when checkpointing before bottomless replication uses a virtual-WAL connection without breaking bottomless replication initialization.
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
- Mostly clear
- Newbie friendliness
- 38/100