A crash-looping ingester is invisible
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Background
src/index.ts restarts a crashed ingester like this:
const restartIngester = (name: string, network: NetworkName, fn: () => Promise<void>) => {
fn().catch(err => {
console.error(`[lens] ${name}/${network} ingester crashed, restarting in 10s:`, err.message)
setTimeout(() => restartIngester(name, network, fn), 10_000)
})
}
The fault isolation is good and the comment above it explains the design well.
What is missing is any awareness of how often this happens. An ingester that
crashes immediately on start will restart every ten seconds forever. There is no
backoff, no cap, no metric, and /status does not mention it — so the service
reports itself healthy while one venue has produced nothing for a week.
What to build
- Exponential backoff with a ceiling, instead of a flat ten seconds.
- A counter metric of restarts, labelled by ingester name and network, exported
through the existingprom-clientregistry insrc/metrics.ts. - A record of the last crash — time and message — per
(ingester, network), so
L167 can surface it on/status. - Reset the backoff once an ingester has run healthily for some period, so a
nightly blip does not permanently slow restarts.
Acceptance criteria
- Restart delay grows on repeated failure and is capped
- Backoff resets after a sustained healthy run
- A Prometheus counter exposes restarts per ingester and network
- Last crash time and message are retrievable per ingester
- The existing fault isolation is preserved — one venue crashing still cannot affect another
Drips Wave · Complexity: Intermediate · 150 points
Repo: Divinity-Labs/Lens. Node + TypeScript, Fastify, Prisma on Postgres,
Redis for queues, Prometheus via prom-client.
Run the tests: npm test. The tests are vitest, not jest. Running jest
against this repo reports "66 suites, 0 tests" and means nothing. A single file
is npx vitest run src/__tests__/yourfile.test.ts.
Load test (prices) is already failing on main and has been for some
time. It is not your PR that broke it. Every other check should be green.
This service prices real assets on Stellar mainnet. A number that is wrong
is worse than a number that is missing, because a caller cannot tell the
difference. Prefer failing loudly over returning a plausible value.
Never elide an address, a contract id or a key in code, a comment or a test
fixture. A previous batch wrote a shortened contract id in an issue text and
five contributors invented plausible-looking ids to fill the gap. Write the
whole thing or do not write it at all.
The house pattern for an outbound deadline already exists — see
src/alerts/delivery.ts, which passes signal: AbortSignal.timeout(10_000) to
fetch. Where an issue below asks for a timeout, copy that, do not invent a
second convention.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 71
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 34
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Divinity-Labs/Lens 的其他 Issue
-
Webhook retries have no jitter, so failures synchronise可能已有人在做 @Richard-tobi 于 1 天前认领。 未关闭area:reliability difficulty:easy help wanted points:100 Stellar Wave
难度 2/5 1-3 小时 新手友好度 80/100
Divinity-Labs/Lens#341 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
The MCP server has no metrics可能已有人在做 @rupesh-kumar-sah 今天认领。 未关闭area:observability difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#425 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Tool descriptions do not tell an agent when to stop可能已有人在做 @rupesh-kumar-sah 今天认领。 未关闭area:mcp difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#424 · 4 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
No test drives a real 402 payment loop可能已有人在做 @Ugasutun 今天认领。 未关闭area:testing difficulty:advanced help wanted points:200 Stellar Wave
Divinity-Labs/Lens#423 · 6 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
The agent example is undocumented可能已有人在做 @GazzyLee 今天认领。 未关闭area:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#422 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 Divinity-Labs/Lens 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 90/100
lingdojo/kana-dojo#32663 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
Admin: Title Separator field can't be cleared (input falls back to "|")可能已有人在做 @emdashbot 今天认领。 未关闭bot:bug bot:in-review
难度 2/5 1-3 小时 新手友好度 80/100
emdash-cms/emdash#4236 · 3 条评论 ·
维护者通常 1 天内回复
-
PHP workflow streaming requests buffer the full SSE response可能已有人在做 @Winoren 今天认领。 未关闭review: medium
难度 2/5 1-3 小时 新手友好度 84/100
langgenius/dify#44270 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
area:holodeck review-finding
难度 2/5 1-3 小时 新手友好度 62/100
hyperdrive-technology/holodeck#142 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
code-yeongyu/senpi#3573 ·
维护者通常 1 天内回复