query-db: requestSnapshot caller abort leaves sole fetch live and publishes late rows
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 18/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 4k
- 派生
- 277
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 213
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/db 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
OfflineExecutor.dispose() never settles pendingTransactionPromises可能已有人在做 @Claire-ovo 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Two @tanstack/db tests time out under CPU load because a cold module import counts against the 5 s default timeout可能已有人在做 @jp-knj 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
liberation-data/drivine#428 · 1 条评论 ·
维护者通常 1 天内回复
-
GitLab: a merge request closed without merging keeps the Git toolbar on View MR instead of Create MR未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
code-yeongyu/oh-my-openagent#11731 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100