Fix missing nil counter

This commit is contained in:
Karl Southern 2015-11-19 14:29:47 +00:00
parent 49e751a9f8
commit e56176bbea

View File

@ -178,6 +178,8 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
begin begin
statement.executeBatch() statement.executeBatch()
statement.close() statement.close()
@exceptions_tracker << nil
rescue => e rescue => e
# Raising an exception will incur a retry from Stud::Buffer. # Raising an exception will incur a retry from Stud::Buffer.
# Since the exceutebatch failed this should mean any events failed to be # 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 # cancel the event, since we may end up outputting the same event multiple times
# if an exception happens later down the line # if an exception happens later down the line
event.cancel event.cancel
@exceptions_tracker << nil
rescue => e rescue => e
# Raising an exception will incur a retry from Stud::Buffer. # Raising an exception will incur a retry from Stud::Buffer.
# We log for the lols. # We log for the lols.