binder: BinderChannelBuilder and BinderServerBuilder should implement maxInboundMessageSize()
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
### Is your feature request related to a problem?
Yes. Senders can trivially OOM a peer with an unending sequence of non-empty [stream transactions](https://github.com/grpc/proposal/blob/master/L73-java-binderchannel/wireformat.md?plain=1) with the `FLAG_MESSAGE_DATA_IS_PARTIAL` flag set.
### Describe the solution you'd like
grpc-binder should establish a default value for client and server `maxInboundMessageSize()`. If a receiver sees a transaction that would cause the next message to exceed this limit, it should "out of band close" the stream with `RESOURCE_EXHAUSTED`.
### Describe alternatives you've considered
None
### Additional context
Even with [stream flow control](https://github.com/grpc/proposal/commit/ea98aa6ee643c6a1b5d5b8a36d8c9ffba7a5342d) receivers must ack transactions whenever the application has `request()`ed at least one message. That design had been relying on this message-layer limit but grpc-binder doesn't seem to implement one.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da BinderChannelBuilder e BinderServerBuilder, quindi segui la gestione delle transazioni di stream di grpc-binder per FLAG_MESSAGE_DATA_IS_PARTIAL. Determina il limite predefinito dei messaggi in ingresso e il percorso del ricevitore che dovrebbe chiudere lo stream con RESOURCE_EXHAUSTED quando il messaggio successivo supererebbe tale limite. Il lavoro è completato quando entrambi i builder espongono il limite e le sequenze di messaggi parziali troppo grandi vengono rifiutate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend-api-design, networking
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100