Decide on collab.db persistence

未关闭
#155 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
sqlite, typescript
领域
backend, databases

调研方向

Start with collab-server/src/server.ts around line 93, then read the context of issues #62 and #54. Compare the proposed persistence and autosave directions, and record a decided policy for collab.db and project-file writes; this issue is done when one direction has clear implementation requirements.

由索引模型根据 Issue 内容生成。

描述

collab.db, the SQLite file used by collab-server to persist Y.Docs, is currently stored under /tmp/. It is removed when CollabServerHandle is disposed, which happens when all editor sessions for a given project are disposed. In order to preserve unsaved changes on shutdown, collab-server includes code to write Y.Doc contents into the project directory, but this currently doesn't fire due to #62. This potential data loss is unintentionally made more rare by #54: since editor sessions aren't ordinarily disposed, shutdown only occurs when the admin kills the editor sessions, or when the container is restarted.

The other issues should be fixed, but a potential desirable change is to persist collab.db and not write the project files to disk in collab-server, instead letting VS clients do that. This would behave a bit more like local VSCode: unsaved changes remain unsaved indefinitely, but are persisted across editor restarts.

Or we could go in the opposite direction and autosave every change, so that unsaved changes simply don't exist. In this case collab.db should remain in /tmp and be discarded.

Or we can keep collab.db ephemeral - see new comments below.

主要语言
TypeScript
星标
12
派生
1
平均合并
1 天 8 小时
30 天内合并 PR
66

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

leanprover/lean-workbench 的其他 Issue

查看 leanprover/lean-workbench 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。