Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15](backport #40572) [libbeat] Stop publisher properly #40617

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 26, 2024

Proposed commit message

We avoided closing the publisher on Stop to avoid races with the ES output since we were not aborting the active connections. This adds:

  • ES output now aborts active requests on Close()
  • Beater closes publisher on stop.
  • Agent manager also closes telemetry and the publisher on the Close callback.

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.

Disruptive User Impact

  • Now ES connections will be aborted on stop and some events might need to be re-sent. This is in any case a change that puts the ES output on par with how the rest of the outputs work, since was the only one leaving active conns unattended from what I observed.

Related issues


This is an automatic backport of pull request #40572 done by [Mergify](https://mergify.com).

* Stop publisher properly

* Just call beater.Stop from manager

* Delete duplicated lines

* Make call to stopBeat idempotent

* Add context at request creation to not break tracing

* Remove unused lint

* Add default WaitClose timeout

* Adjust wait on close time

* Add delay to account for the stop of the publisher

* Fix lint issues

* Fix lint issues

* Fix lint

(cherry picked from commit 4808269)
@mergify mergify bot requested a review from a team as a code owner August 26, 2024 15:35
@mergify mergify bot added the backport label Aug 26, 2024
@mergify mergify bot requested review from rdner and VihasMakwana and removed request for a team August 26, 2024 15:35
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2024
@botelastic
Copy link

botelastic bot commented Aug 26, 2024

This pull request doesn't have a Team:<team> label.

@marc-gr marc-gr enabled auto-merge (squash) August 26, 2024 15:42
@marc-gr marc-gr disabled auto-merge August 26, 2024 15:42
@pierrehilbert
Copy link
Collaborator

run docs-build

@marc-gr marc-gr merged commit b19844f into 8.15 Aug 27, 2024
123 checks passed
@marc-gr marc-gr deleted the mergify/bp/8.15/pr-40572 branch August 27, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants