Skip to content

Commit

Permalink
LOG-4151: add patch for: Fluentd fix missing nil check for rotated_tw…
Browse files Browse the repository at this point in the history
… in update_watcher

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
  • Loading branch information
vparfonov authored and openshift-merge-robot committed May 30, 2023
1 parent 0d90a41 commit ae2157b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 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)

0 comments on commit ae2157b

Please sign in to comment.