Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Ordered loader can drop the debt of an invalidation that arrives while a finished repair releases its leases

オープン
#2,222 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間 12分
マージ済み PR(30日)
229

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/db のほかの issue

TanStack/db の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。