io.grpc.SerializingExecutor swallows RuntimeExceptions thrown by gRPC services
- Lenguaje dominante
- Java
- Estrellas
- 12.1k
- Forks
- 4k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 37
Descripción
Users can call ServerBuilder#executor() to arrange for gRPC service callbacks like onNext(), onError() and onCancelHandler to be dispatched on a custom Executor. However, when one of those callbacks throws a RuntimeException (due to bug / programming error in the service) that Executor and/or its Thread's UncaughtExceptionHandler never sees it. Instead, io.grpc.SerializingExecutor catches the RuntimeException, logs it and just keeps going.
This might be enough in the datacenter where server logs are typically retained for later debugging, but for mobile "on-device" gRPC servers, the java.util.logging output isn't typically seen by anyone. In that environment, it's more common to handle unexpected Exceptions programmatically and gRPC should somehow make this possible.
Guía de contribución
Línea de trabajo
Comienza con io.grpc.SerializingExecutor y la ruta ServerBuilder#executor() descrita en el issue. Rastrea cómo se gestionan las RuntimeExceptions de callbacks del servicio como onNext(), onError() y onCancelHandler, y determina después un comportamiento explícito que permita a los servidores móviles gestionarlas mediante programación en lugar de limitarse a registrarlas. Se considera terminado cuando el comportamiento de manejo de excepciones elegido está definido y verificado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- backend-api-design
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100