DB Sync: journal page created on two devices, top-level blocks silently emptied on merge
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 8/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- clojure, ios, linux, macos, sqlite
调研方向
The report is a sync merge bug in the E2EE graph with no reproduction, so there is no single file to start from. Read the sync and merge path that handles top-level block ordering and created-at on reconnect, and check related issues #779, #780 and #781 for the stalled-sync context. Done would mean a reproducible test where concurrent edits to one journal page keep both sides or raise a conflict, instead of emptying blocks.
由索引模型根据 Issue 内容生成。
描述
Search first
- I searched and no similar issues were found
What Happened?
E2EE graph synced between Desktop (macOS), iOS and a read-only CLI client (Linux).
- Overnight, during a macOS maintenance wake with nobody at the computer, Desktop created today's journal page together with an empty first block (same millisecond). logseq/logseq#11913 was meant to avoid creating that block before the user edits it.
- In the morning, Desktop edits on that page (top-level blocks with children) did not reach the server for ~3 h, with no visible error (see #780).
- On iOS, I pasted an image into the first, empty block of that page.
- I restarted Desktop to force sync.
Result, now the same on all devices:
- all top-level blocks are empty, including a task and a parent block that had text; nested blocks kept their text;
- Desktop's blocks kept their UUIDs but got a new
:block/created-at(merge time), and the top-level ones were moved before the first block (Zy,Zz... <a0); - the task title was emptied without bumping
:block/updated-at; - the image ended up in Desktop's empty first block from step 1.
No conflict prompt, nothing in Recycle, graph validate finds no errors. iOS and Desktop showed different versions for a while, then converged.
Reproduce the Bug
Not reproduced yet. Likely path: two devices share today's journal; device A edits it while its sync is silently stalled (#779, #780); device B edits the first block; device A reconnects.
Expected Behavior
Keep both sides' changes, or show a conflict. Never empty blocks silently.
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
Desktop 2.0.2 (macOS arm64), iOS 2.0.2 (54) TestFlight, CLI rev 533ac43 (Linux). E2EE on.
Additional Context
Related: #781 (data loss with pending changes on 2 devices), logseq/logseq#13036 (journal children lost on rebase).
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
- 主要语言
- 没有语言数据
- 星标
- 29
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
logseq/db-test 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialog可能已有人在做 @tiensonqin 于 59 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
Disabling Flashcards in Settings does not disable Flashcard shortcuts or tags可能已有人在做 @tiensonqin 于 60 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
Becksteinlab/imdclient#161 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复
-
geodata good first issue
难度 2/5 1-3 小时 新手友好度 62/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
dgunning/edgartools#2019 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 72/100
alltheplaces/alltheplaces#20745 ·
维护者通常 1 天内回复