Skip to content

Commit

Permalink
Reset backoff factor on partial ACK (#1819)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen Siering authored and ruflin committed Jun 8, 2016
1 parent 070b7bc commit f914870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha3...master[Check the HEAD d
==== Bugfixes

*Affecting all Beats*
- Reset backoff factor on partial ACK. {issue}1803[1803]

*Metricbeat*

Expand Down
3 changes: 2 additions & 1 deletion libbeat/outputs/mode/single/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,14 @@ func (s *Mode) publish(

sendFail:
logp.Info("send fail")
s.backoff.Wait()

fails++
if resetFail {
debugf("reset fails")
s.backoff.Reset()
fails = 0
}
s.backoff.Wait()

if !guaranteed && (s.maxAttempts > 0 && fails == s.maxAttempts) {
// max number of attempts reached
Expand Down

0 comments on commit f914870

Please sign in to comment.