From 06c2e005dfe0adadd56af9149fd85118e062f5e5 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Mon, 21 Dec 2020 17:24:25 +0900 Subject: [PATCH] in_tail: Use fixed value instead of variable Signed-off-by: Hiroshi Hatake --- lib/fluent/plugin/in_tail.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index e4b17c93a5..1bb48e3d7b 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -896,7 +896,6 @@ def opened? def handle_notify with_io do |io| begin - bytes_to_read = 8192 number_bytes_read = 0 start_reading = Fluent::EventTime.now read_more = false @@ -904,7 +903,7 @@ def handle_notify if !io.nil? && @lines.empty? begin while true - @fifo << io.readpartial(bytes_to_read, @iobuf) + @fifo << io.readpartial(8192, @iobuf) @fifo.read_lines(@lines) number_bytes_read += @lines.last.size