Redis going away is noticed once and never again
Los mantenedores suelen responder en 3 días
@abdulrahmanj383-creator ya está trabajando en esto.
Desde el 16/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Background
src/index.ts falls back when the Redis-backed retention worker cannot start:
} catch (err) {
console.warn('[lens] Snapshot retention worker skipped (Redis unavailable):', (err as Error).message)
console.warn('[lens] Falling back to an in-process hourly prune')
await Promise.allSettled([retentionQueue?.close(), retentionWorker?.close()])
setInterval(() => { void safePrune() }, 60 * 60 * 1000).unref()
}
The fallback itself is good design. The problem is that it is decided exactly
once, at boot, and never revisited. If Redis is briefly unavailable during a
deploy, the process spends its entire life on the in-process path — and because
every instance does its own hourly prune, with more than one instance they
overlap. /status says nothing about which path is in use, so the degraded mode
is invisible.
What to build
- Expose which retention path is active, through
/statusand a gauge. - Re-check Redis periodically and switch back to the queue when it returns,
cancelling the interval cleanly. - Make the in-process prune safe to run concurrently across instances, or guard
it so only one instance prunes. - Log the transition in both directions, at a level that is actually visible.
Acceptance criteria
- The active retention path is visible without reading boot logs
- Redis returning causes a switch back, with the interval cleared
- Concurrent prunes across instances cannot corrupt or duplicate work
- Both transitions are logged
- A test covers the fallback and the recovery
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 71
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 157
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Divinity-Labs/Lens
-
Webhook retries have no jitter, so failures synchronisePosiblemente ocupada @Richard-tobi la tomó hace 12 días. Abiertoarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Divinity-Labs/Lens#341 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Divinity-Labs/Lens#626 ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Divinity-Labs/Lens#625 ·
Los mantenedores suelen responder en 3 días
-
Live Service Spec Drift ReportAbiertoarea:tests automated live-spec-report
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
Divinity-Labs/Lens#606 · 5 comentarios ·
Los mantenedores suelen responder en 3 días
-
The key is accepted only as a bearer token, and nothing says soPosiblemente ocupada @krsnak la tomó hace 10 días. Abiertoarea:docs difficulty:easy help wanted points:100 Stellar Wave
Divinity-Labs/Lens#512 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
Todos los issues de Divinity-Labs/Lens
Issues similares
-
e2e-failure ready-to-code
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
ai-handle
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nextlevelbuilder/dewee-web-v2#73 ·
Los mantenedores suelen responder en 1 día
-
backend bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
PoCInnovation/Distribox#255 ·
Los mantenedores suelen responder en 1 día