tursodatabase / tursodatabase/libsql

Embedded replica local copy can empty itself?

Open
#2,115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

We have user complaining that embedded replica local copy emptied itself:

https://discord.com/channels/933071162680958986/1389647489069482064/1389647666320773250

The only thing I can think of is sync failure somehow putting WAL in bad state and checkpoint overwriting page 1 to drop the schema.

Let's investigate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Discord report and the embedded replica sync path, then inspect how WAL handling interacts with checkpointing and page 1. The investigation is complete when it establishes whether a sync failure can erase the schema and identifies evidence or a reproducible failure; no files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, sqlite
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.