Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

One failed session lock renewal loses the session: no retry, no log, no signal to running activities

Abierto
#61 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

bug

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

How it fails

  1. The renewal at T+25 s fails once, for example on a dropped connection or a pool timeout.
  2. The next attempt is the next tick, at T+50 s. The locks expired at T+30 s.
  3. A provider renews only a lock that is still valid (duroxide-pg requires locked_until > now). So the renewal at T+50 s matches 0 rows. It returns Ok(0), and a count of 0 is not logged.
  4. 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/duroxide

Todos los issues de microsoft/duroxide

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.