Best way to handle events that are too large for buffering
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza en RawSocketSender.send(), especialmente en el búfer pendings y en la ruta de BufferOverflowException mostrada en el stack trace; compara ese comportamiento con el uso de BufferedOutputStream. Determina y documenta el manejo previsto para los eventos más grandes que el búfer y para los errores del sender, y verifica después que el comportamiento elegido esté cubierto por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When looking through RawSocketSender to troubleshoot our other issue (see comment on #18), I noticed that RawSocketSender does not handle large events very well in send(). It assumes that flush() always makes enough capacity in the pendings buffer to save the new bytes. If the event was bigger than the buffer, you get a BufferOverflowException.
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
at java.nio.ByteBuffer.put(ByteBuffer.java:859)
at org.fluentd.logger.sender.RawSocketSender.send(RawSocketSender.java:171)
Also, if every log message you send is larger than the buffer, then the RawSocketSender will attempt to flush to the socket on every message.
Is this the desired behavior? I could imagine adding a size check to the send() method that immediately returns false if the event is too large, to avoid the BufferOverflowException. Or perhaps the large event could skip the buffer and write directly out to the socket. Since we are already using a BufferedOutputStream, I also wonder why we need the internal pendings buffer at all?
What is the normal way of handling errors in RawSocketSender?
- Lenguaje dominante
- Java
- Estrellas
- 210
- Forks
- 86
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 fluent/fluent-logger-java
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
fluent/fluent-logger-java#100 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
fluent/fluent-logger-java#99 · 1 comentario · 2 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
fluent/fluent-logger-java#98 · 1 comentario ·
-
Null Pointer Exception with slf4j-log4j12-1.7.30 (Fluent-logger incompatible with the new version) Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
fluent/fluent-logger-java#89 · 3 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
fluent/fluent-logger-java#88 · 1 comentario ·
Todos los issues de fluent/fluent-logger-java
Issues similares
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/flink-agents#1152 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
objectionary/eo-graphs#75 ·