Skip to content

[9.1](backport #45073) Fix Elasticsearch output retry backoff when receiving 429s#45098

Merged
pierrehilbert merged 1 commit into9.1from
mergify/bp/9.1/pr-45073
Jul 1, 2025
Merged

[9.1](backport #45073) Fix Elasticsearch output retry backoff when receiving 429s#45098
pierrehilbert merged 1 commit into9.1from
mergify/bp/9.1/pr-45073

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jun 27, 2025

See #36926. This fix has two components:

  • Return an error from Publish when the Elasticsearch output gets a 429 (too many requests) from Elasticsearch. This triggers a retry delay and reconnection attempt in the pipeline.
  • Break the backoff counters for Publish and Connect into separate values, so a successful Connect call (which for Elasticsearch just means that an empty http GET gave an ok response) doesn't reset the exponential backoff for bulk ingest requests when they are being throttled.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

This comment on the issue has local testing instructions.

Related issues

See #36926. This fix has two components:
- Return an error from `Publish` when the Elasticsearch output gets a 429 (too many requests) from Elasticsearch. This triggers a retry delay and reconnection attempt in the pipeline.
- Break the backoff counters for `Publish` and `Connect` into separate values, so a successful `Connect` call (which for Elasticsearch just means that an empty http GET gave an ok response) doesn't reset the exponential backoff for bulk ingest requests when they are being throttled.

(cherry picked from commit 8b25d5b)
@mergify mergify Bot added the backport label Jun 27, 2025
@mergify mergify Bot requested a review from a team as a code owner June 27, 2025 21:31
@mergify mergify Bot requested review from mauri870 and removed request for a team June 27, 2025 21:31
@mergify mergify Bot assigned faec Jun 27, 2025
@mergify mergify Bot requested a review from faec June 27, 2025 21:31
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 27, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions Bot added bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Jun 27, 2025
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 27, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Jun 30, 2025

This pull request has not been merged yet. Could you please review and merge it @faec? 🙏

@pierrehilbert pierrehilbert merged commit 5775927 into 9.1 Jul 1, 2025
205 checks passed
@pierrehilbert pierrehilbert deleted the mergify/bp/9.1/pr-45073 branch July 1, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants