ManagedClientTransport.start should be better defined
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by reading ManagedClientTransport.start, InternalSubchannel, and the start invocations in NettyClientTransportTest. Determine the intended Runnable lifecycle and whether the proposed InternalSubchannel lock changes are in scope; done requires an agreed API contract and corresponding callers and tests that no longer rely on ignored or null return values.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend-api-design, networking
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100