Skip to content

Commit

Permalink
Fix wrong description of total retry time
Browse files Browse the repository at this point in the history
See also: fluent/fluentd#3649

Before the fix and fluent/fluentd#3640 ,
the both of retry behavior and the document were wrong.

Actual behavior: `c + c + cb^1 + ... + cb^(k-1)` (k+1 retries totally)
Total calculation: `cb^(-1) + c + cb^1 + ... + cb^(k-2)`

Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed Mar 25, 2022
1 parent 6af8d47 commit c8f16a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A chunk can fail to be written out to the destination for a number of reasons. T
By default, Fluentd increases the wait interval exponentially for each retry attempt. For example, assuming that the initial wait interval is set to 1 second and the exponential factor is 2, each attempt occurs at the following time points:

```text
1 2 4 8 16
0 1 3 7 15
x-x---x-------x---------------x-------------------------
│ │ │ │ └─ 4th retry (wait = 8s)
│ │ │ └───────────────── 3th retry (wait = 4s)
Expand Down
3 changes: 2 additions & 1 deletion configuration/buffer-section.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ With `exponential_backoff`, `retry_wait` interval will be calculated as below:
* c: constant factor, `@retry_wait`
* b: base factor, `@retry_exponential_backoff_base`
* k: number of retry times
* total retry time: `c + c * b^1 + (...) + c*b^k = c*b^(k+1) - 1`
* total retry time: `c + c*b^1 + (...) + c*b^(k-1) = c*(b^k - 1) / (b - 1)`
* = `2^k - 1` by default

If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.

0 comments on commit c8f16a3

Please sign in to comment.