Don't understand some sentences in the document

https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.2/java-docs-bulk-processor.html

.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:

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?

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

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