query-db: a Query refetch that joins a loader's refetch acquisition does not report shifted pages
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
- 8/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- data-engineering
Rechercherichtung
The gate is in packages/query-db-collection/src/query.ts in recordOrderedPageResult, where acquisitionRefetches suppresses results for a hash. Read how the guard counts overlapping acquisitions and how a joined Query fetch differs from the acquisition's own result. The issue asks for a named replay in the query-db refetch oracle with two live queries; done means that replay fails before a fix and passes after it. Expect the fix to be a design change, not a one-line edit.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Query DB does not report invalidateLoadedSubsets() for a Query refetch that joins a running refetch: true loader acquisition on the same Query hash. If that refetch shifts the page, other ordered live queries that rely on the page can keep a #2136-style gap.
Where
packages/query-db-collection/src/query.ts, recordOrderedPageResult. The gate skips a result while acquisitionRefetches holds its hash. This loop guard stops a repair's own result from starting another repair. Since #2154 (commit 0216c6026), the guard counts overlapping acquisitions, but it still cannot tell a joined user refetch from the acquisition's own result.
Shape of a trace (not yet reproduced)
- Loader A starts a bounded repair. Its
refetch: trueprefix acquisition on Query hash H is in flight. utils.refetch()orinvalidateQueriesruns. Query joins the in-flight fetch for H, after the backend changed.- The result for H has different keys and a later page follows it. Without the guard it would report.
- The guard suppresses the report. Loader A repairs its own window from the result, but loader B, whose window also used H's page, gets no report.
Status
No history in the query-db refetch oracle reaches this. The oracle's limits section and the coverage map record it.
Suggested witness
A named replay in the query-db refetch oracle with two live queries over the same pages. Hold one loader's repair acquisition, change the backend, run a Query refetch, then release. The coverage law should fail for the second live query if the defect is real. A possible fix: record the fetch that the acquisition started, not the hash, and report other fetches' results.
This issue was written by Isaac.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.9k
- Forks
- 277
- Ø Merge
- 20 Std. 31 Min.
- Gemergte PRs (30 T.)
- 228
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 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 12/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 8/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
area: app type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ExpidetGames/code-reviewer#585 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
module-federation/core#5205 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
LanternOps/breeze#9392 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
engine-rs P3 review-deferral wasm
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
maniator/verticopolis#1154 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag