Skip to content

Commit c8f16a3

Browse files
committed
Fix wrong description of total retry time
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 <fukuda@clear-code.com>
1 parent 6af8d47 commit c8f16a3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

buffer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A chunk can fail to be written out to the destination for a number of reasons. T
4141
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:
4242

4343
```text
44-
1 2 4 8 16
44+
0 1 3 7 15
4545
x-x---x-------x---------------x-------------------------
4646
│ │ │ │ └─ 4th retry (wait = 8s)
4747
│ │ │ └───────────────── 3th retry (wait = 4s)

configuration/buffer-section.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ With `exponential_backoff`, `retry_wait` interval will be calculated as below:
546546
* c: constant factor, `@retry_wait`
547547
* b: base factor, `@retry_exponential_backoff_base`
548548
* k: number of retry times
549-
* total retry time: `c + c * b^1 + (...) + c*b^k = c*b^(k+1) - 1`
549+
* total retry time: `c + c*b^1 + (...) + c*b^(k-1) = c*(b^k - 1) / (b - 1)`
550+
* = `2^k - 1` by default
550551

551552
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.
552553

0 commit comments

Comments
 (0)