One failed session lock renewal loses the session: no retry, no log, no signal to running activities
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- distributed-systems
Línea de trabajo
Start at the renewal loop in src/runtime/dispatchers/worker.rs around lines 899-926, where the error branch only warns and waits for the next tick, and read the defaults in src/runtime/mod.rs lines 365-366 that set the 25 s interval against a 30 s lock timeout. Then follow the renewal call into the provider (duroxide-pg renews only rows with locked_until > now and returns Ok(0) on a mismatch) to see why a late retry silently matches nothing. Done means a failed renewal is retried before expiry, a row-count shortfall against in-flight sessions is logged, and lost sessions reach their activities' cancellation token.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The session manager renews all session locks of a runtime with one renew_session_lock call per interval. If that call fails once, it is not tried again before the locks expire. The sessions are then lost without a log line, and the activities that run on those sessions are not told.
Where
run_session_manager. The error branch only logs a warning and waits for the next tick: https://github.com/microsoft/duroxide/blob/6a458861763a7aa5b78a7c1c97691a6f00489a8b/src/runtime/dispatchers/worker.rs#L899-L926- Defaults:
session_lock_timeoutis 30 s andsession_lock_renewal_bufferis 5 s, so the renewal runs every 25 s: https://github.com/microsoft/duroxide/blob/6a458861763a7aa5b78a7c1c97691a6f00489a8b/src/runtime/mod.rs#L365-L366
How it fails
- The renewal at T+25 s fails once, for example on a dropped connection or a pool timeout.
- The next attempt is the next tick, at T+50 s. The locks expired at T+30 s.
- A provider renews only a lock that is still valid (
duroxide-pgrequireslocked_until > now). So the renewal at T+50 s matches 0 rows. It returnsOk(0), and a count of 0 is not logged. - From T+30 s another worker can claim the session. The activities of the first worker for that session still run. Two workers now work on the same session.
How this was checked
Read in the code. Not reproduced.
Suggested fix
- Retry a failed renewal soon, for example every second, until it works or the lock timeout has passed.
- Compare the number of renewed rows with the number of sessions that this runtime has in flight. Log a warning when a session was lost.
- Signal the activities of a lost session through their cancellation token, or report the loss to the host. #38 (item 6) asks for session lease events. This failure is the case that needs them most.
Tracked in #55.
- Lenguaje dominante
- Rust
- Estrellas
- 221
- Forks
- 61
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni 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 microsoft/duroxide
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
prune_kv_values_updated_before emits actions in HashMap order; replay fails with `kv clear mismatch`Posiblemente ocupada @akhil9tiet la tomó hace 4 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
-
A failed activity lock renewal can lose the activity result; the orchestration waits foreverAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de microsoft/duroxide
Issues similares
-
documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
adorsys/status-list-server#619 ·
Los mantenedores suelen responder en 2 días
-
batch-backport only backports the first 30 matching PRsPosiblemente ocupada @DvirDukhan la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
equinor/septic-config-generator#481 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día