Optional expiry for persisted demand coverage
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- Active
- Stack technique
- sqlite, typescript
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 3.9k
- Forks
- 277
- Merge moyen
- 18 h 7 min
- PR mergées (30 j)
- 228
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TanStack/db
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 1-2 jours Accessibilité débutants 48/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 1-2 jours Accessibilité débutants 48/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TanStack/db
Issues similaires
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
openclaw/openclaw#182077 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
aikido high security
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand markPeut-être pris @eric8810 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
[Feature]: 建议导入源后,自动切换到新导入的源Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
lyswhut/lx-music-desktop#3026 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
abhigyanpatwari/GitNexus#3704 ·
Les mainteneurs répondent en général sous 1 jour