lib/logstash/outputs/analyticdb.rb in logstash-output-analyticdb-5.4.0.6 vs lib/logstash/outputs/analyticdb.rb in logstash-output-analyticdb-5.4.0.7
- old
+ new
@@ -305,10 +305,11 @@
if @max_flush_exceptions > 0 and count_as_attempt == true
attempts += 1
if attempts > @max_flush_exceptions
@logger.error("JDBC - max_flush_exceptions has been reached. #{submit_actions.length} events have been unable to be sent to SQL and are being dropped. See previously logged exceptions for details.")
+ raise "JDBC - max_flush_exceptions #{max_flush_exceptions} has been reached. #{submit_actions.length} events have been unable to be sent to SQL and are being dropped. See previously logged exceptions for details."
break
end
end
# If we're retrying the action sleep for the recommended interval
@@ -368,13 +369,14 @@
statement
end
def retry_exception?(exception, event)
- retrying = (exception.respond_to? 'getSQLState' and (RETRYABLE_SQLSTATE_CLASSES.include?(exception.getSQLState.to_s[0, 2]) or @retry_sql_states.include?(exception.getSQLState)))
+ # retrying = (exception.respond_to? 'getSQLState' and (RETRYABLE_SQLSTATE_CLASSES.include?(exception.getSQLState.to_s[0, 2]) or @retry_sql_states.include?(exception.getSQLState)))
+ retrying = true
log_jdbc_exception(exception, retrying, event)
- true
+ retrying
end
def log_jdbc_exception(exception, retrying, event)
current_exception = exception
log_text = 'JDBC - Exception. ' + (retrying ? 'Retrying' : 'Not retrying')