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

worker: the scheduler double-emits every recurring job if outpost-worker scales past 1

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript

調査の方向性

packages/outpost/queue/src/scheduler.ts:79 と apps/worker/src/index.ts:94,117 から始めて、scheduler の構築と起動を追跡します。関連する調整のコンテキストについて、SystemConfig テーブルと既存の issue #133 を調べます。完了条件は、outpost-worker が 1 つを超えるレプリカにスケールされた場合でも、重複した enqueue なしに、定期ジョブが 1 つの worker レプリカだけから発行されることです。

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

説明

area: infrastructure roadmap roadmap: next

packages/outpost/queue/src/scheduler.ts:79 schedules recurring jobs with a plain in-process interval:

const timer = setInterval(() => this.tick(definition), definition.intervalMs);

apps/worker/src/index.ts:94 constructs one Scheduler per process and starts it at :117. With a single outpost-worker replica this is correct. At two replicas, both tick, and every scheduled job type — SLA_CHECK, ONBOARDING_DIGEST, GITHUB_REACTION_POLL, ACCOUNT_SCORING, JOB_CLEANUP — is enqueued twice per interval.

Why it matters

It is a scaling landmine rather than a live defect: nothing warns you, and the first symptom would be duplicate outbound posts from the digest, which is exactly the class of bug #133 was filed to prevent.

Fix

Leader election on the SystemConfig table — a lease row the scheduler must hold, renewed each tick, so exactly one replica emits. Alternatively, split the scheduler into its own single-replica service. Either way, worth landing before anyone scales the worker, not after.

主要言語
TypeScript
スター
12
フォーク
6
平均マージ
2時間 23分
マージ済み PR(30日)
2

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

CopilotKit/outpost のほかの issue

CopilotKit/outpost の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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