Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Optimistic history oracle retains source rows from an aborted batch

未关闭
#2,063 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
testing-qa

调研方向

Start with collection-state-retention-oracle.property.test.ts and trace how the oracle driver handles beginSourceBatch() and aborts for sourceKeys and sourceRows. Run the saved replay using the provided TANSTACK_DB_ORACLE_* values, then add the focused oracle-driver comparison described in the issue. Done means a partial update after abort behaves like one after a committed delete and the replay passes.

由索引模型根据 Issue 内容生成。

描述

The optimistic history oracle can report a false production failure after an aborted open source batch. Its driver restores sourceKeys on abort, but beginSourceBatch() has also changed sourceRows, and the abort path does not restore that ledger.

A minimal legal history starts with row 2 at c: 0:

  1. Open a source batch that deletes row 2.
  2. Abort that batch.
  3. Apply a partial update for row 2 whose input has c: -1.

After the abort, the source still holds row 2 at c: 0. The partial-update driver should omit c, so the update should preserve c: 0. Instead, its stale sourceRows ledger says row 2 is absent. The driver writes c: -1, and the independent model correctly rejects the resulting publication.

This reproduces on clean origin/main at 9e8ed997885fb46ac98ec85906f4ca4f662e7cce in collection-state-retention-oracle.property.test.ts. The saved replay is TANSTACK_DB_ORACLE_SEED=-1161486883, TANSTACK_DB_ORACLE_PROPERTY=collection-state.optimistic-history-partial, and TANSTACK_DB_ORACLE_PATH=93:3:2:6:8:13:12:14:14:15:10:10:10:10:11:10:10:10:10:10:10:10.

Restore both source ledgers when an open batch aborts. A focused oracle-driver test should then compare a partial update after abort with one after a committed delete.

主要语言
TypeScript
星标
3.9k
派生
268
平均合并
1 天 3 小时
30 天内合并 PR
193

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/db 的其他 Issue

查看 TanStack/db 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。