Document the default River retry jitter and correct the default-policy type reference

オープン 初心者向け
#1,608 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
documentation

調査の方向性

NextRetry のコメントを internal/retrypolicy/default.go の実装と併せて読み、次に retry_policy.go の Config.RetryPolicy のコメントを確認してください。ジッターの範囲、エラーに基づく失敗回数、最大期間の上限を記述し、DefaultClientRetryPolicy へのリンクを追加してください。両方のコメントが動作を正確に説明していれば完了です。issue では実行するテストは指定されていません。

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

説明

The doc comment on DefaultClientRetryPolicy.NextRetry describes a fourth-power delay in seconds, for example 16 seconds after the second failure. The implementation in internal/retrypolicy/default.go applies up to 10% jitter in either direction, so in that example the delay is approximately 14.4 to 17.6 seconds.

The comment should describe the jitter range, that the failure count is taken from the recorded errors, and the cap at the maximum Go duration. Once the base delay reaches the cap, the scheduled delay stays at the cap. This is needed to interpret retry timestamps and to write assertions with correct bounds.

Separately, the comment on Config.RetryPolicy refers to DefaultRetryPolicy. The exported type is DefaultClientRetryPolicy, and the comment should link to it.

retry_policy.go · internal/retrypolicy/default.go · PR #1023 · client.go

主要言語
Go
スター
5.9k
フォーク
205
平均マージ
12時間 2分
マージ済み PR(30日)
24

環境構築

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

はじめの一歩

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

riverqueue/river のほかの issue

riverqueue/river の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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