Best way to handle events that are too large for buffering
まだ誰も着手していません。
評価
調査の方向性
RawSocketSender.send() から始め、特に pendings バッファーとスタックトレースに示されている BufferOverflowException のパスを確認し、その動作を BufferedOutputStream の使用方法と比較します。バッファーより大きいイベントと sender エラーの意図された処理を決定して文書化し、選択した動作がテストでカバーされていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Java
- スター
- 210
- フォーク
- 86
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluent/fluent-logger-java のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
fluent/fluent-logger-java#100 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
fluent/fluent-logger-java#99 · コメント 1 件 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
fluent/fluent-logger-java#98 · コメント 1 件 ·
-
Null Pointer Exception with slf4j-log4j12-1.7.30 (Fluent-logger incompatible with the new version) オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
fluent/fluent-logger-java#89 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
fluent/fluent-logger-java#88 · コメント 1 件 ·
fluent/fluent-logger-java の issue をすべて見る
似ている issue
-
area/plugin
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kestra-io/plugin-kestra#190 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/rocketmq-dashboard#5064 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
wso2/dpdp-accelerator#287 ·