Decide on collab.db persistence

Aperta
#155 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
sqlite, typescript
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
12
Fork
1
Merge medio
1g 8h
PR unite (30g)
66

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leanprover/lean-workbench

Tutte le issue di leanprover/lean-workbench

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.