Flaky SQLite test: caller_deadline_caps_open_startup_execution_and_async_execution sees Timeout instead of TimeBudgetExceeded
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
Línea de trabajo
Empieza en crates/registry-platform-sqlite/src/statement.rs: lee la aserción que falla cerca de la línea 1427 y luego execute_until, especialmente la espera del permiso cerca de la línea 393 y la asignación de tokio::time::timeout_at a Timeout cerca de la línea 418. Decide si la expiración del plazo del llamador asíncrono también debería informar TimeBudgetExceeded o si la prueba debería aceptar cualquiera de los dos resultados; después ejecuta cargo test -p registry-platform-sqlite statement::tests::caller_deadline_caps_open_startup_execution_and_async_execution repetidamente, idealmente bajo carga. Hecho significa que la prueba ya no depende de qué lado gane la carrera y sigue demostrando que el plazo interrumpe el trabajo en ejecución.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened
The Rust tests (platform) job failed in the merge group for #2727 (run 44767589662, 20 Nov 2026). #2727 does not touch registry-platform-sqlite. The next merge-group run for the same PR passed, and #2727 merged.
test statement::tests::caller_deadline_caps_open_startup_execution_and_async_execution ... FAILED
panicked at crates/registry-platform-sqlite/src/statement.rs:1427:9:
assertion `left == right` failed
left: Timeout
right: TimeBudgetExceeded
test result: FAILED. 7 passed; 1 failed; 0 ignored
Likely cause
The failing assertion is the last one in the test. It calls execute_before with a caller deadline 1 ms away and expects TimeBudgetExceeded.
In execute_until, two observers watch the same deadline:
- The blocking worker runs the statement, and SQLite's progress check stops it at the deadline. That returns
TimeBudgetExceeded. - The async side waits for the worker with
tokio::time::timeout_at(async_deadline, execution), and maps expiry toTimeout(line 418). The permit wait at line 393 does the same.
When the worker has not returned its result by the time the timer fires, the async side reports Timeout. With a 1 ms deadline this depends on how quickly the blocking thread starts and notices the deadline, so a loaded runner can lose the race. The synchronous startup case (line 1417) has no async timer and is not affected.
The known consumer maps both kinds to the same code: registry-adapter-engine reports Timeout and TimeBudgetExceeded as adapter.sqlite.statement-budget. So this looks like a test race rather than a defect that users would see.
Suggested fix
One of:
- In the test, accept either
TimeoutorTimeBudgetExceededfor the 1 ms async case. Both show that the caller deadline stopped the work. - If one kind per cause is the intended contract, map expiry of the caller's deadline on the async side to
TimeBudgetExceededas well, and keep the strict assertion.
Do not lengthen the deadline to hide the race. The test is meant to prove the deadline interrupts running work.
Impact
Merge-queue entries that select the platform Rust tests can be dropped. Rerunning the entry has passed so far.
- Lenguaje dominante
- Rust
- Estrellas
- 2
- Forks
- 0
- Merge medio
- 9 h 48 min
- PR fusionados (30 d)
- 151
Preparar el entorno
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 registrystack/registry-stack
-
area:breg enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
registrystack/registry-stack#2765 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
registrystack/registry-stack#2761 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
registrystack/registry-stack#2706 ·
Los mantenedores suelen responder en 1 día
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directoryAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
registrystack/registry-stack#2704 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#2698 ·
Los mantenedores suelen responder en 1 día
Todos los issues de registrystack/registry-stack
Issues similares
-
[Bug] 建议把黑白主题设置同步到启动页面Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
stackabletech/airflow-operator#898 ·
Los mantenedores suelen responder en 1 día
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)Posiblemente ocupada @zyl71 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100