OutboxProcessorListener events are emitted before the transaction commits; metrics over-count on commit failure
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start in OutboxProcessor.processNext, where listener.onEntryProcessed runs right after store.updateAfterProcessingBatch and before the transaction commits. Then read OutboxScheduler and the TransactionRunner used around runInTransaction to see where an after-commit notification could go. Done means listener callbacks fire only after a successful commit, or the pre-commit behaviour is documented; the design choice needs maintainer input first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Severity: Low · Area: okapi-core OutboxProcessor listener notifications · Found in: code review of main @ e5630a1
Problem
OutboxProcessor.processNext calls listener.onEntryProcessed(...) (Delivered / RetryScheduled / Failed) right after store.updateAfterProcessingBatch, while still inside the scheduler's transaction, before it commits. If the commit then fails (connection loss, serialization failure, server-side timeout), the DB rolls back to PENDING, but okapi.entries.delivered and okapi.entries.failed have already been incremented. The rows are delivered again next tick and counted again.
Metrics therefore over-report successful deliveries in exactly the failure scenarios where operators rely on them. A custom listener that does something non-idempotent (e.g. notifying another system) would act on a state that was never persisted.
Suggested fix
Defer listener callbacks until after the transaction commits: for example, return the processed entries from the transactional block and notify in OutboxScheduler after runInTransaction returns, or register an after-commit hook through TransactionRunner. At minimum, document that events are pre-commit.
- Lenguaje dominante
- Kotlin
- Estrellas
- 14
- Forks
- 0
- Merge medio
- 9 h 54 min
- PR fusionados (30 d)
- 11
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 softwaremill/okapi
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
softwaremill/okapi#141 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 1-2 días Aptitud para principiantes 42/100
softwaremill/okapi#136 ·
Los mantenedores suelen responder en 1 día
-
breaking-change bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
softwaremill/okapi#135 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 Medio día Aptitud para principiantes 62/100
softwaremill/okapi#134 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
softwaremill/okapi#133 ·
Los mantenedores suelen responder en 1 día
Todos los issues de softwaremill/okapi
Issues similares
-
autoteam community connectors/destination/mssql connectors/source/hubspot team/use
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
airbytehq/airbyte#91201 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Source: c7 Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
2.23
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ankidroid/Anki-Android#23042 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Submission] AI通话助手Abiertosubmit-adaption submit-adaption-pre
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
BetterAndroid/android-notification-icon-project#828 · 1 comentario ·
Los mantenedores suelen responder en 1 día