Failed DB graph download leaves an empty local graph that blocks clean retry
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 28
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Search first
- I searched open and closed issues. The iOS empty-graph report is a different successful-import and persistence case.
What happened?
A failed DB graph snapshot download leaves a canonical local graph database behind. Desktop can then open that empty graph, and the CLI can reject a later correct retry because the graph already exists.
This reproduced through multiple pre-import failures:
- Missing E2EE password.
- Incorrect E2EE password.
- TLS failure during the initial
:fetch-pullrequest. - db-worker runtime startup failure.
The remote snapshot was never imported, but <root>/graphs/<graph> remained. In Desktop, selecting or restoring that graph showed an empty journal and no remote pages. If it remained the startup graph, relaunching opened or recreated the empty graph without initiating a new remote download.
Manual recovery required switching to another graph, removing the failed local graph, and retrying the remote download.
Reproduce
- Choose a remote DB graph that does not exist locally.
- Force a failure before snapshot import, for example an incorrect E2EE password or unreachable sync endpoint.
- Observe the download error.
- List or open local graphs.
- Retry with valid credentials or connectivity.
Expected behavior
Snapshot download should be transactional. Preparation should occur in temporary storage, and a new local graph should be promoted only after successful import. A failed newly-created database should be removed automatically or clearly marked as an incomplete download that can be retried.
Platform
- Logseq Desktop 2.0.1 on macOS arm64
- Current CLI repository build
- DB Sync, including E2EE graphs
Contributor guide
No contributing guide indexed for this repository
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 at the DB graph snapshot download and pre-import setup described in the reproduction steps, then trace when the canonical local graph is created and when import succeeds or fails. Reproduce a pre-import failure with incorrect credentials or an unreachable endpoint; done means failed new downloads leave no usable empty graph and a valid retry can proceed cleanly.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, databases, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100