Ordered loader can drop the debt of an invalidation that arrives while a finished repair releases its leases
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
Start with finishOrderedPrefixRepair() in packages/db/src/query/live/ordered-source-loader.ts and the request-authority oracle in packages/db/tests/query/ordered-source-loader-state-oracle.test.ts. Add a release callback that calls invalidateSourceOrdering() during retirement, then run the oracle test and check its progress law. Done means the regression fails before the fix and the next repair pass issues a read afterward.
由索引模型根据 Issue 内容生成。
描述
Summary
A review of #2194 reported a possible defect in OrderedSourceLoader.finishOrderedPrefixRepair() (packages/db/src/query/live/ordered-source-loader.ts). No test reproduces it yet.
When a bounded repair finishes, the loader releases the leases that the repair superseded. Then it moves the work slot to idle with debt none. A release can run adapter code. That code can deliver an ordering invalidation, for example a loadedSubsets:invalidated report or an order-changing update. Then invalidateSourceOrdering() moves the ordering epoch while the repair still owns the work slot. The debt is already bounded, so it stays bounded. The final move then sets the debt to none.
Expected
An ordering invalidation that arrives during the release pass gets a bounded repair (ARCHITECTURE.md, "Ordered requests, continuation, and recovery").
Possible result
The loader drops the debt of the newer invalidation. The window can keep wrong rows until some other change invalidates the ordering.
Next step
Before a change, add a witness that fails. The request-authority oracle in packages/db/tests/query/ordered-source-loader-state-oracle.test.ts has release callbacks that reenter the loader. A release callback that calls invalidateSourceOrdering() during the repair's retirement pass reaches this history. Its progress law requires the next pass to issue a read.
A possible change: before the final move, compare the chain's epoch with the current ordering epoch, and keep the debt if the epoch moved.
This issue was written by Isaac.
- 主要语言
- TypeScript
- 星标
- 3.9k
- 派生
- 277
- 平均合并
- 18 小时 7 分钟
- 30 天内合并 PR
- 228
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/db 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
相似的 Issue
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Status: Triage
难度 2/5 1-3 小时 新手友好度 76/100
mermaid-js/mermaid#8546 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
维护者通常 1 天内回复