query-db: requestSnapshot caller abort leaves sole fetch live and publishes late rows
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- data-engineering
Rechercherichtung
Start with the failing witness cancels the final public snapshot acquisition on caller abort in packages/query-db-collection/tests/load-subset-lifecycle-oracle.test.ts and trace how the requestSnapshot signal reaches the Query-backed acquisition and its unloadSubset call. Done means the sole-owner test sees the transport signal aborted, the load promise rejected, and no late row, while peer-owner and abort-after-commit cases still pass. Read the Collection sync-adapter guide before changing ownership handling, since Core also aborts this signal during normal release.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Bug
Aborting the signal passed to a public subscription.requestSnapshot({ signal }) leaves a sole Query-backed acquisition active. Its provider fetch stays live, the returned load promise fulfills, and a row returned afterward becomes visible.
Reproduction
On PR #2158 at 28f9ed6aa, the cancels the final public snapshot acquisition on caller abort witness in packages/query-db-collection/tests/load-subset-lifecycle-oracle.test.ts uses a held provider result. After the caller aborts, the observed result is:
transport signal aborted: false
load promise: fulfilled
Collection rows: [{ id: "late" }]
The expected result is an aborted sole transport, a rejected load, and no late row. This is a public requestSnapshot path, not a direct _sync.loadSubset call.
Contract and repair boundary
The Collection sync-adapter guide requires request-scoped commits to honor the request abort signal. A shared physical Query must remain live while another acquisition owns it, so abort handling must distinguish the caller's acquisition from the Query's remaining owners. A direct attempt to unload on every acquisition-signal abort broke three existing cleanup/peer histories: Core also aborts that signal during ordinary release, before invoking unloadSubset.
The load-subset lifecycle oracle should cover both sole and peer owners at the caller-abort cut, plus abort after commit acceptance. The existing held-fetch peer tests abort and explicitly unload together, so they do not isolate caller abort. Keep the sole-owner witness as an expected failure until the ownership boundary is repaired.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4k
- Forks
- 277
- Ø Merge
- 17 Std. 40 Min.
- Gemergte PRs (30 T.)
- 223
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 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Garbage collection cleans up a collection while one of its transactions is still persistingEvtl. vergeben @Nabil372 hat das vor 1 Tag übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
persistedCollectionOptions without a schema can't be passed to createCollection (follow-up to #1452)Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Merit-Systems/x402scan#1312 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Native Web
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
digitalfabrik/integreat-app#4517 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
TLS guide repeats certs/ in the certificate directoryEvtl. vergeben @maheshrijal hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
prometheus/docs#3156 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
medusajs/dtc-starter#90 ·
Maintainer antworten meist innerhalb von 1 Tag