Decide on collab.db persistence

オープン
#155 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
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時間
マージ済み PR(30日)
66

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

leanprover/lean-workbench のほかの issue

leanprover/lean-workbench の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。