Conversation
重构云端同步引擎并修复若干传输缺陷,使大文件同步不再阻塞界面、失败后可收敛。 按书同步引擎 - 新增 per-book-sync:以「每本书一个同步文件」取代原先的「每设备整体快照」, 单本书的改动不再牵动全库,冲突面收敛到单本书内。 - sync-store 中云端后端改用按书引擎;局域网仍保留原有设备快照协议。 - 新增迁移:sync_tombstones 增加 book_id 列,使删除的笔记/高亮/书签能归属到 所属书籍,跟随该书的同步文件传播。删除接口改为先查出 book_id 再写墓碑。 原生流式传输 - 新增 Rust 侧 WebDAV 传输(webdav_upload_file / webdav_download_file), 数据在磁盘与服务端之间直接流式收发,多兆字节的书本与封面不再进入 WebView 的 JS 堆。此前经插件传输时请求体会被序列化为 JS 数字数组, 在主线程构造,是同步时界面卡死的根因。 - 重试策略与前端一致:网络错误、429、5xx 退避重试至多 3 次,4xx 立即失败。 目录与并发 - 上传前递归创建远端缺失目录,修复首次同步(设备快照)时返回 404 的问题。 - 传输并发数可配置(设置项 syncConcurrency,7 个语言),弱网关/NAS 可降到 1-2。 - 单条目失败不再中断整轮同步,改为记录后继续,跨轮次逐步收敛。 - 缩短写库等待同步让出的上限,避免长同步期间界面写操作被长时间阻塞。 测试 - 新增 per-book 同步、webdav 客户端/后端单测;同步 store 测试补齐并发配置断言。
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
重构云端同步引擎并修复若干传输缺陷,使大文件同步不再阻塞界面、失败后可收敛。
按书同步引擎
原生流式传输
目录与并发
测试
注意: