Feature Proposal: report progress writing to sockets
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- scala
- Área
- networking
Línea de trabajo
Start by reading the Stream trait and locating the fs2 socket implementations that write incrementally. Review how default implementations can preserve bincompat and where each subclass would need an override; the work is done when socket writes report incremental progress through both proposed APIs.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
https://github.com/http4s/http4s/issues/7824 reports that spurious http4s timeouts occur writing very large chunks to a socket. The fs2 socket implementations (all?) actually write to the socket incrementally, but do not provide any indication to the caller that they are making progress.
This could take the form of two new methods on the Stream trait:
/** Writes `bytes` to the peer, reporting as bytes are written.
*
* Completes when the bytes are written to the socket.
*/
def writeProgress(bytes: Chunk[Byte]): Stream[F, Int] =
Stream.eval(write(bytes)) >> Stream(bytes.size)
/** Writes the supplied stream of bytes to this socket via `writeProgress` semantics.
*/
def writesProgress: Pipe[F, Byte, Int] = s => s.chunks.flatMap(writeProgress)
By returning a stream of their progress, a caller can implement a timeout that only triggers if individual writes to the underlying socket take too long.
Unfortunately, default implementations must be provided to preserve bincompat. The writesProgress implementation would work in general, but writeProgress would need a useful override in each subclass to report incremental progress.
- Lenguaje dominante
- Scala
- Estrellas
- 2.5k
- Forks
- 633
- Merge medio
- 3 d 21 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de typelevel/fs2
-
Reading from a socket gets stuck on Node.js 26Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
typelevel/fs2#3800 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Scala Native TLSSocket#applicationProtocol behavior is inconsistent with JVMPosiblemente ocupada @reardonj la tomó hace 23 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
Los mantenedores suelen responder en 3 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
typelevel/fs2#3719 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 3 días
Todos los issues de typelevel/fs2
Issues similares
-
No test covers transaction re-request after a delivery timeoutPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ergoplatform/ergo#2916 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Area: PDF support
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
orbeon/orbeon-forms#8055 ·
Los mantenedores suelen responder en 2 días
-
Table of downloads is too longAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lichess-org/database#103 ·
-
kind:bug priority:major
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día