Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
successful operation if all duplicates
When processing an error return, if we find that all responses
were either successful or a duplicate, treat this as a successful
operation.
  • Loading branch information
richm committed Apr 20, 2018
1 parent 3be8990 commit d5862be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fluent/plugin/elasticsearch_error_handler.rb
Expand Up @@ -62,6 +62,10 @@ def handle_error(response)
stats.each_pair { |key, value| msg << "#{value} #{key}" }
@plugin.log.debug msg.join(', ')
end
if stats[:successes] + stats[:duplicates] == bulk_message_count
@plugin.log.debug("retry succeeded - all #{bulk_message_count} records were successfully sent")
return
end
stats.each_key do |key|
case key
when 'out_of_memory_error'
Expand Down

0 comments on commit d5862be

Please sign in to comment.