Skip to content

Commit

Permalink
write the metadata into file as soon as possible after initializing i…
Browse files Browse the repository at this point in the history
…nternal data
  • Loading branch information
tagomoris committed Jul 13, 2017
1 parent 34ef000 commit ea86fc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fluent/plugin/buffer/file_chunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def create_new_chunk(path, perm)
@meta.set_encoding(Encoding::ASCII_8BIT)
@meta.sync = true
@meta.binmode
write_metadata(update: false)
rescue => e
# This case is easier than enqueued!. Just removing pre-create buffer file
@chunk.close rescue nil
Expand Down

0 comments on commit ea86fc0

Please sign in to comment.