InternalSubChannel doesn't comply with the connectivity state spec
- Lenguaje dominante
- Java
- Estrellas
- 12.1k
- Forks
- 4k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 37
Descripción
When receiving a GOAWAY (`transportShutdown()` callback), `InternalSubChannel` unconditionally [transitions to `IDLE`](https://github.com/grpc/grpc-java/blob/v1.2.0/core/src/main/java/io/grpc/internal/InternalSubchannel.java#L439). However, the [spec](https://github.com/grpc/grpc/blob/v1.2.1/doc/connectivity-semantics-and-api.md) says
1. `READY` transitions to `TRANSIENT_FAILURE` on "any failure encountered while expecting successful communication on established channel."
1. "Channels that receive a GOAWAY when there are no active or pending RPCs should also switch to IDLE".
`InternalSubchannel` needs to look at the status passed to `transportShutdown()`:
- If it's not OK, according to Rule 1 above, the new state should be `TRANSIENT_FAILURE`
- If it's OK, then it's a GOAWAY.
- If the in-use state of the subchannel is `false`, according to Rule 2 above, the new state should be `IDLE`.
- Otherwise, the spec doesn't say what the new state should be. Apparently it cannot stay in `READY`. It cannot go to `TRANSIENT_FAILURE` either because it's a GOAWAY, not an error. This part of the spec should be revisited.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.