Queue storage: an ambiguous receipt claim can pin a slot's rescue cursor

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, rust
領域
backend, databases

調査の方向性

Read the receipt rescue cursor logic and the stale-heartbeat and deadline receipt sweeps, then inspect the regression tests for receipt mode and lease_claim_receipts. Start by tracing how an ambiguous claim affects cursor advancement. Add a test with more than 10,000 stale claims behind one ambiguous claim in a single slot; done means later claims are reached while the ambiguous claim is still reported.

索引モデルが issue の本文から書いたものです。

説明

In receipt mode, one stale claim that rescue cannot settle can stop rescue in that claim slot from reaching later stale claims.

Rescue skips an attempt whose retained ready bodies are ambiguous, logs it, and leaves the claim open. The slot's receipt-rescue cursor only advances past claims that are closed, lease-managed, or closed by the current statement, so the cursor stays on the skipped claim. Each pass scans at most RECEIPT_RESCUE_CURSOR_SCAN_LIMIT (10,000) claims from the cursor, so stale claims more than 10,000 positions after it in the same slot are never reached. The open claim also keeps the slot from being pruned. The stale-heartbeat and deadline receipt sweeps both have this shape.

The lease-plane equivalent, where ambiguous attempts filled the frozen 500-row selection, is fixed in #691. This is the receipt-plane remainder. It is most likely with legacy claims that have no emitted-lane evidence.

Possible directions: advance the cursor past attempts that the current pass has excluded as ambiguous, keeping a separate record so they're still reported; or add a bounded side scan past the pinned position. A regression test needs more than the scan limit of stale claims behind one ambiguous claim in a single slot, with lease_claim_receipts enabled.

主要言語
Rust
スター
37
フォーク
8
平均マージ
14時間 16分
マージ済み PR(30日)
244

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

hardbyte/awa のほかの issue

hardbyte/awa の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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