Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/fluent/plugin/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
require 'fluent/clock'
require 'fluent/ext_monitor_require'

require 'json'
require 'time'

module Fluent
Expand Down Expand Up @@ -1212,7 +1213,7 @@ def next_flush_time
end
end

UNRECOVERABLE_ERRORS = [Fluent::UnrecoverableError, TypeError, ArgumentError, NoMethodError, MessagePack::UnpackError, EncodingError]
UNRECOVERABLE_ERRORS = [Fluent::UnrecoverableError, TypeError, ArgumentError, NoMethodError, MessagePack::UnpackError, EncodingError, JSON::GeneratorError]

def try_flush
chunk = @buffer.dequeue_chunk
Expand Down
4 changes: 3 additions & 1 deletion test/plugin/test_output_as_buffered_backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def wait_flush(target_file)
'argument error' => ArgumentError,
'no method error' => NoMethodError,
'msgpack unpack error' => MessagePack::UnpackError,
'encoding error' => EncodingError)
'encoding error' => EncodingError,
'json generate error' => JSON::GeneratorError
)
test 'backup chunk without secondary' do |error_class|
Fluent::SystemConfig.overwrite_system_config('root_dir' => TMP_DIR) do
id = 'backup_test'
Expand Down
Loading