Optional expiry for persisted demand coverage
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- sqlite, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.9k
- Forks
- 277
- Ø Merge
- 17 Std. 54 Min.
- Gemergte PRs (30 T.)
- 226
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TanStack/db
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
SQLite persistence: a sync transaction whose durable write fails still changes the public CollectionOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
sqlite-persistence: leader term write on every page load delays reading rowsEvtl. vergeben @KyleAMathews hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Renaming a projectOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
equinor/prisma-decision-web#927 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
bigbluebutton/bigbluebutton#26166 ·
Maintainer antworten meist innerhalb von 1 Tag