From e56176bbead66078916c237828e4b24b8187cec2 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Thu, 19 Nov 2015 14:29:47 +0000 Subject: [PATCH] Fix missing nil counter --- lib/logstash/outputs/jdbc.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/logstash/outputs/jdbc.rb b/lib/logstash/outputs/jdbc.rb index 96d2220..64bc89f 100644 --- a/lib/logstash/outputs/jdbc.rb +++ b/lib/logstash/outputs/jdbc.rb @@ -178,6 +178,8 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base begin statement.executeBatch() statement.close() + @exceptions_tracker << nil + rescue => e # Raising an exception will incur a retry from Stud::Buffer. # Since the exceutebatch failed this should mean any events failed to be @@ -203,6 +205,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base # cancel the event, since we may end up outputting the same event multiple times # if an exception happens later down the line event.cancel + @exceptions_tracker << nil rescue => e # Raising an exception will incur a retry from Stud::Buffer. # We log for the lols.