Skip to content

Commit

Permalink
keep compatibility of "disable_chunk_backup" option
Browse files Browse the repository at this point in the history
Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed Jan 26, 2023
1 parent a8f241f commit 0467bdb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/fluent/plugin/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ def configure(conf)
buffer_conf = conf.elements(name: 'buffer').first || Fluent::Config::Element.new('buffer', '', {}, [])
@buffer = Plugin.new_buffer(buffer_type, parent: self)
@buffer.configure(buffer_conf)
keep_buffer_config_compat
@buffer.enable_update_timekeys if @chunk_key_time

@flush_at_shutdown = @buffer_config.flush_at_shutdown
Expand Down Expand Up @@ -434,6 +435,12 @@ def configure(conf)
self
end

def keep_buffer_config_compat
# Need this to call `@buffer_config.disable_chunk_backup` just as before,
# since some plugins may use this option in this shape.
@buffer_config[:disable_chunk_backup] = @buffer.disable_chunk_backup
end

def start
super

Expand Down

0 comments on commit 0467bdb

Please sign in to comment.