Ordered loader: a page-capping provider loses a moved row from a joined window after refetch
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 18/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- databases
调研方向
Start with the pinned it.fails test in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts, which encodes the eight-step history against a provider with pageCap 2. Run it to see the failure 'window after refetch at step 3 was []; expected [7]', then trace where the ordered loader's repair path treats a short page as exhaustion. Read PR #2154 on branch fix-query-db-refetch-ordered-gap first. Done when the test passes without the it.fails marker and the refetch oracle's generated scenarios accept pageCap.
由索引模型根据 Issue 内容生成。
描述
Summary
With a provider that returns fewer rows than a request's limit (a page cap), an on-demand joined ordered window can lose a row after a refetch. The row's order changed, and the loader's own repair drops it. A short reply does not prove that the source is exhausted (glossary), so the loader must keep reading.
Reproduction
The pinned witness is a capped provider keeps a moved row in the window after a refetch (known loader defect) in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts (branch fix-query-db-refetch-ordered-gap, PR #2154). It is an it.fails test today.
- Provider: cursor encoding,
pageCap: 2. - Query:
rank desc,offset 1,limit 2, LEFT-joined marker filter. - Initial rows: id 0 (rank 1, marked), id 1 (rank 0, unmarked).
- History:
- Mark id 7.
- Upsert id 2 at rank 1.
- Upsert id 7 at rank 0.
- Refetch.
- Delete id 3.
- Invalidate.
- Upsert id 3 at rank 1.
- Upsert id 0 at rank 0.
Failure: window after refetch at step 3 was []; expected [7].
Scope
This reproduces on main, through the loader's own repair. It is separate from #2136. The query-db refetch oracle's generated campaigns use an uncapped provider because of this defect. A page-capped trace together with a peer live query also fails (found while #2154 was reviewed). That trace fails the same way with the loader's first-page skip disabled.
Suggested witness and owner
- Owner: the ordered loader. The repair and continuation path must treat a short page as "not exhausted".
- Witness: flip the pinned
it.failstest, then addpageCapto the query-db refetch oracle's generated scenario.
This issue was written by Isaac.
- 主要语言
- TypeScript
- 星标
- 3.9k
- 派生
- 272
- 平均合并
- 22 小时 54 分钟
- 30 天内合并 PR
- 236
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/db 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 22/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 8/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 5/100
维护者通常 1 天内回复
相似的 Issue
-
Endpoint links in the tag operations list are below the 24px target size可能已有人在做 @AdzerKI 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ai-driven-qa bug Minor
难度 2/5 1-3 小时 新手友好度 80/100
linagora/twake-tasks#435 ·
维护者通常 1 天内回复
-
bug domain: database priority: p1 Stellar Wave
难度 2/5 1-3 小时 新手友好度 74/100
StellarState/SS-backend#632 · 1 条评论 ·
维护者通常 1 天内回复
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)可能已有人在做 @O1sumitkumar 今天认领。 未关闭bug good first issue help wanted python
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
`cf complete zsh >> .zshrc` fails on vanilla zsh可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
cloudflare/cf#340 ·
维护者通常 1 天内回复