Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Shared persistent server-side state

Aperta
#310 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
helm, postgresql, typescript

Direzione di ricerca

Inizia leggendo src/lib/server/trino/user-clients.ts, src/lib/server/auth.ts, src/lib/server/trino/queries.ts e src/routes/healthz/+server.ts, quindi esamina values.yaml e le probe di Helm. Scegli un backing store che copra i quattro consumer e definisci il comportamento di replicaCount. Il lavoro è completato quando lo stato condiviso sopravvive ai riavvii e alle repliche, /healthz e /readyz eseguono controlli distinti e le probe sono aggiornate.

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

Descrizione

Epic: Shared persistent server-side state

All server-side state is held in process-local Maps, so the deployment is capped at one replica and a restart drops everything.
Part of this is already tackled in the ongoing FileBrowser PRs.

[!NOTE]
This text is AI generated against our normal policy because it is migrated from another place, when we tackle this for real it needs to be properly rewritten

Four places:

  • Trino connection configsrc/lib/server/trino/user-clients.ts:18,
    new Map<string, UserEntry>(). Per-user URL and credentials.
  • Sessions and userssrc/lib/server/auth.ts. betterAuth() is called without a
    database option, so it uses the built-in memory adapter.
  • Query statesrc/lib/server/trino/queries.ts:76,79. Progress, rows, status and
    per-tab access times.
  • Readinesssrc/routes/healthz/+server.ts. Liveness and readiness both point at
    /healthz, which always returns 200.

What this costs

  • replicaCount is a plain user-settable chart value (values.yaml:4, documented as
    "Number of replicas") with nothing stopping someone setting it to 2. At two replicas
    users are logged out at random, a query started on one pod is invisible to the other,
    and a saved connection only exists on the pod that received it.
  • A restart orphans running queries in Trino, loses completed results, and logs everyone out.
  • A readiness probe has nothing meaningful to check, so /readyz would be a placeholder
    until a backing store exists.

Scope

  • Pick a backing store and wire all four consumers to it. #41 proposes PostgreSQL for
    better-auth; whatever is chosen should cover all four rather than solving them separately.
  • Split /healthz (liveness, trivial) and /readyz (readiness, checks the store), and
    update the Helm probes.
  • Decide what replicaCount > 1 does until then: document the constraint, or make the
    chart reject it.

Out of scope

  • Persisting completed query results beyond their TTL (STACKABLE_COCKPIT_QUERY_TTL, default 1800s). Separate question.
  • S3 credentials in localStorage (#306). Client-side, different problem.
Lingua principale
TypeScript
Stelle
1
Fork
0
Merge medio
22h 6m
PR unite (30g)
12

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 stackabletech/cockpit

Tutte le issue di stackabletech/cockpit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.