Optional expiry for persisted demand coverage
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
Direzione di ricerca
Start with the persisted demand coverage proposal in issue #2102 and compare its behavior with the persistedGcTime control discussed in #1380 and #1400. The issue leaves the expiry start time, its relationship to row retention, and the implementation deferred until a user asks; first clarify those design decisions. Done would mean defining the optional expiry behavior and adding a settlement timestamp to the coverage record, as described here.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The persisted demand coverage proposal (#2102, item 1) lets the persisted wrapper settle an on-demand load from SQLite when that exact demand finished loading in an earlier session. Coverage stays valid until its persisted cache generation ends, or until a later load of the same demand settles.
After a demand is released, its source stops sending changes for it. A deleted or moved row keeps appearing in that demand's offline result until the demand loads again online. For many offline-first apps, the last complete result is the right answer. Others may want a bound on how old a covered result can be before the app stops trusting it offline.
Query DB already has this control for its own retention: persistedGcTime keeps a released Query's persisted rows for a TTL or until revalidated (#1380, #1400).
Proposal
Add an optional expiry to persisted demand coverage. Its shape should follow persistedGcTime:
- a finite duration measured from when the covered load settled, or from when the demand was released (to be decided);
- an "until revalidated" value, which is the default and today's proposed behavior.
An expired demand counts as uncovered. It waits for the network and is reported the same way as any uncovered demand.
Not doing yet
Do not implement this until a user asks for it. The default (valid until revalidated or until the generation ends) needs no option. This issue records the design so the coverage record keeps room for a timestamp.
Design notes
- Store the settlement time with the coverage record now, so that expiry can be added later without a storage migration.
- Decide whether Query DB's
persistedGcTimeshould drive this expiry for Query Collections, or stay a separate row-retention control. - An oracle law would add a clock to the persisted-readiness model: a covered demand settles from SQLite only while its coverage is unexpired at the load's start.
Related: #2102, #1380, #1955.
- Lingua principale
- TypeScript
- Stelle
- 3.9k
- Fork
- 277
- Merge medio
- 18h 12m
- PR unite (30g)
- 229
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/db
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Ordered-replay oracle: terminal error after a failed settle following truncate markersForse già presa @KyleAMathews l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 58/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
db-ux-design-system/core-web#8613 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
foxglove/mcap#1907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug internal-plugin pr-welcome upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dsh-tauri-desk/deepseek-harness-desktop#1225 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
unjs/unhead#1027 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno