From 39601d7ef840bf9194f1122cfcf08a5c82f6f418 Mon Sep 17 00:00:00 2001 From: Vitalii Parfonov Date: Tue, 30 May 2023 16:05:29 +0300 Subject: [PATCH] LOG-4151: add patch for: Fluentd fix missing nil check for rotated_tw in update_watcher Signed-off-by: Vitalii Parfonov --- fluentd/fluentd.source0001.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fluentd/fluentd.source0001.patch diff --git a/fluentd/fluentd.source0001.patch b/fluentd/fluentd.source0001.patch new file mode 100644 index 000000000..728c63966 --- /dev/null +++ b/fluentd/fluentd.source0001.patch @@ -0,0 +1,13 @@ +diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb +index 3ad5943f8..ac38f5eeb 100644 +--- a/lib/fluent/plugin/in_tail.rb ++++ b/lib/fluent/plugin/in_tail.rb +@@ -509,7 +509,7 @@ module Fluent::Plugin + if new_position_entry.read_inode == 0 + # When follow_inodes is true, it's not cleaned up by refresh_watcher. + # So it should be unwatched here explicitly. +- rotated_tw.unwatched = true ++ rotated_tw.unwatched = true if rotated_tw + # Make sure to delete old key, it has a different ino while the hash key is same. + @tails.delete(rotated_target_info) + @tails[new_target_info] = setup_watcher(new_target_info, new_position_entry)