More aggressively retry Redis commands
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- redis, ruby
调研方向
未指定任何文件或测试。首先盘点 ci-queue 发出的每条 Redis 命令,并检查 redis gem 的重试配置;完成标准是:对 Redis 的瞬时故障进行重试,同时不允许非幂等命令破坏状态。
由索引模型根据 Issue 内容生成。
描述
Acceptance Criteria
- We need to go over all the commands we emit and make sure they are idempotent, otherwise retrying could result in a corrupted state, lost tests etc.
- The redis gem has the necessary elements for that it's mostly just configuration.
Context
Sometimes our Redis server that handle the ci-queue workload experience a failover or some other availability issues.
When this happens it break builds even though it recovers pretty fast.
Examples
Error connecting to Redis on redacted.svc.cluster.local.:6379 (SocketError) (Redis::CannotConnectError)
./tmp/bundle/ruby/3.1.0/gems/redis-4.8.0/lib/redis/client.rb:162:in `call': MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'. (Redis::CommandError)
(that later one need to be better categorized by the redis gem though)
Solution
Ideally we'd be resilient to these small transient errors, this means retrying all or most commands and possibly waiting a bit before retrying. The redis gem has the necessary elements for that it's mostly just configuration.
However we need to go over all the commands we emit and make sure they are idempotent, otherwise retrying could result in a corrupted state, lost tests etc.
cc @ChrisBr
- 主要语言
- Ruby
- 星标
- 240
- 派生
- 37
- 平均合并
- 28 分钟
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Shopify/ci-queue 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 65/100
-
难度 4/5 3-5 天 新手友好度 50/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 2/5 1-3 小时 新手友好度 38/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
security
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
ds-drift
难度 1/5 1 小时以内 新手友好度 88/100
we-promise/sure#3934 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
hanami/hanami-view#287 · 3 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复