From 721e128f29a16b142d84b0001a006344cebf97e7 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Tue, 17 May 2016 12:05:02 +0100 Subject: [PATCH] Add success state. Just incase. --- lib/logstash/outputs/jdbc.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/logstash/outputs/jdbc.rb b/lib/logstash/outputs/jdbc.rb index 8ceed5d..f2a9c9a 100644 --- a/lib/logstash/outputs/jdbc.rb +++ b/lib/logstash/outputs/jdbc.rb @@ -10,19 +10,22 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base STRFTIME_FMT = "%Y-%m-%d %T.%L".freeze # Will never work, but only because it duplicates data (i.e. duplicate keys) - # Will throw a warning. + # Will log a warning, but not retry. SQL_STATES_IGNORE = [ - ### Constraint Violation + ### Class: Unqualified Successful Completion + # Success. This shouldn't get thrown, but JDBC driver quality varies, so who knows. + 0000, + + ### Class: Constraint Violation # Integrity constraint violation. 23000, # A violation of the constraint imposed by a unique index or a unique constraint occurred. 23505 ] - # Will never work because of SQL statement errors. - # Will throw an error. + # Will log an error, but not retry. SQL_STATES_FATAL = [ - ### Data Exception + ### Class: Data Exception # Character data, right truncation occurred. Field too small. 22001, # Numeric value out of range.