olivere / elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch
https://olivere.github.io/elastic/
MIT License
7.39k stars 1.15k forks source link

Fix: Bulk processor retries indefinitely on failure #1661

Open rafaeljusto opened 1 year ago

rafaeljusto commented 1 year ago

When all retries are exhausted the worker internal requests buffer needs to be cleared in failure scenarios. That is required because the commitFunc (and consequently the underlying BulkService.Do call) doesn't reset it when some error happens. Without clearing the internal buffer the worker will continue sending the same requests on the following rounds of execution.

Kudos for this solution goes to @rwynn and @raiRaiyan .

Resolves #1278

rafaeljusto commented 1 year ago

Hey @olivere , as this repository is deprecated, is it not accepting patches anymore?

olivere commented 1 year ago

Yes. This repository is deprecated and basically dormant. You are strongly encouraged to switch to the official client.