io.grpc.SerializingExecutor swallows RuntimeExceptions thrown by gRPC services
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with io.grpc.SerializingExecutor and the ServerBuilder#executor() path described in the issue. Trace how RuntimeExceptions from service callbacks such as onNext(), onError(), and onCancelHandler are handled, then determine an explicit behavior that lets mobile servers handle them programmatically instead of only logging them. Done means the chosen exception-handling behavior is defined and verified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend-api-design
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100