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

未关闭 适合新手
#1,608 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
documentation

调研方向

结合实现阅读 internal/retrypolicy/default.go 中 NextRetry 的注释,然后检查 retry_policy.go 中 Config.RetryPolicy 的注释。记录 jitter 范围、基于错误的失败次数以及最大时长上限,并链接到 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 分钟
30 天内合并 PR
24

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

riverqueue/river 的其他 Issue

查看 riverqueue/river 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。