# Don't understand some sentences in the document

**URL:** <https://discuss.elastic.co/t/dont-understand-some-sentences-in-the-document/182344>\
**Category:** Elasticsearch\
**Created:** [May 23, 2019, 5:20am UTC](https://discuss.elastic.co/t/dont-understand-some-sentences-in-the-document/182344 "2019-05-23T05:20:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangbin](https://avatars.discourse-cdn.com/v4/letter/w/e47c2d/32.png) [@wangbin](https://discuss.elastic.co/u/wangbin)\
**Post date:** [May 23, 2019, 5:20am UTC](https://discuss.elastic.co/t/dont-understand-some-sentences-in-the-document/182344/1 "2019-05-23T05:20:32Z")

</div>

> **[Using Bulk Processor | Java API \[6.2\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.2/java-docs-bulk-processor.html)**

```auto
.setBackoffPolicy(
            BackoffPolicy.exponentialBackoff(TimeValue.timeValueMillis(100), 3)) 

```

> Set a custom backoff policy which will initially wait for 100ms, increase exponentially and retries up to three times.

I don't quite understand the meaning of this sentence.  
What the "increase exponentially" means?  
I found an example after this:

```auto
sets backoffPolicy to an exponential backoff with 8 retries and a start delay of 50ms. The total wait time is roughly 5.1 seconds.

```

How is the result of this 5.1s calculated?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 23, 2019, 5:36am UTC](https://discuss.elastic.co/t/dont-understand-some-sentences-in-the-document/182344/2 "2019-05-23T05:36:45Z")

</div>

Basically it says that after a failure, it waits for 100ms before retrying.  
If it fails again, it waits then 200ms before retrying.  
Then it waits 400ms. Something along those lines.

But the exact math is:

```
int result = start + 10 * ((int) Math.exp(0.8d * (currentlyConsumed)) - 1);

```

See [https://github.com/elastic/elasticsearch/blob/11fa8d37440403169a50b37dcc4a6d751e10ae69/server/src/main/java/org/elasticsearch/action/bulk/BackoffPolicy.java](https://github.com/elastic/elasticsearch/blob/11fa8d37440403169a50b37dcc4a6d751e10ae69/server/src/main/java/org/elasticsearch/action/bulk/BackoffPolicy.java)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2019, 5:36am UTC](https://discuss.elastic.co/t/dont-understand-some-sentences-in-the-document/182344/3 "2019-06-20T05:36:55Z")

</div>

Closed on June 20, 2019, 5:36am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
