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

A late acknowledgement from an expired attempt can overwrite the retry attempt

クローズ
#75 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Start with acknowledge.lua, then trace the lease-expiry retry flow and the worker_ids data mentioned in the issue. Reproduce the sequence where an expired attempt is requeued and a newer attempt reacquires the task. Done means a late acknowledgement from the old attempt cannot remove, publish for, or delete state belonging to the newer attempt.

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

説明

bug real

Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).

acknowledge.lua identifies an in-flight attempt only by its membership in the running set:

local removed = redis.call('ZREM', KEYS[1], ARGV[1])
if removed == 0 then
  return 0  -- Task already reaped, skip
end

The reaper requeues a task after its lease expires. A second attempt then acquires the same task ID and the entry exists again. A late acknowledgement from the original attempt finds the entry and wins. It does three things:

  • It removes the running entry of the second attempt.
  • It publishes the result of the first attempt.
  • It removes the task hash (DEL KEYS[3]) that the second attempt still uses.

The second attempt continues to run with its state removed. When it finishes, its acknowledgement is a no operation and the backend discards its result. worker_ids already records which worker holds which attempt. Fencing on the acquiring worker or on an attempt token can correct this.

This error is not the same as the claim race in #71. #71 guards the decision of the broker. This error is the acknowledgement of the worker that arrives after a requeue.

主要言語
Python
スター
19
フォーク
1
平均マージ
14時間 37分
マージ済み PR(30日)
22

環境構築

はじめの一歩

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

codingjoe/threadmill のほかの issue

codingjoe/threadmill の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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