grpc / grpc/grpc-java

ManagedClientTransport.start should be better defined

Abierto
#2,691 0 comentarios 0 reacciones 0 asignados Ver en GitHub
code health
Lenguaje dominante
Java
Estrellas
12.1k
Forks
4k
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Descripción

Calling `ManagedClientTransport.start` returns a Runnable, but it isn't clear what to do with it, or when it should be called. While the code is annotated `@CheckReturnValue`, the annotation doesn't get inherited across class boundaries, leading to places where the value is ignored. `NettyClientTransportTest` contains several invocations of `start`, but ignores the return value due to `NettyClientTransport` currently returning null.

The difficulty of describing when and how the Runnable should be used feels indicative of shaky API. It would be nice to modify InternalSubchannel to not need to acquire locks to alleviate the need to run code outside of locks. This is not urgent.

@zhangkun83

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza leyendo ManagedClientTransport.start, InternalSubchannel y las invocaciones de start en NettyClientTransportTest. Determina el ciclo de vida previsto de Runnable y si los cambios propuestos en el bloqueo de InternalSubchannel están dentro del alcance; se considera terminado cuando exista un contrato de API acordado, junto con los correspondientes llamadores y tests que ya no dependan de valores de retorno ignorados o null.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
backend-api-design, networking
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.