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.x](backport #40794) Add test for elasticsearch re-connection after network error & allow graceful shutdown #41454

Merged
merged 1 commit into from
Oct 25, 2024

Commits on Oct 25, 2024

  1. Add test for elasticsearch re-connection after network error & allow …

    …graceful shutdown (#40794)
    
    This commit reworks the `eslegclient.Connection` to accept a context in its `Connect` method, this allows the caller to cancel any in flight requests made by the connection by cancelling the context.
    
    The libbeat `outputs.Connectable` interface (used by `outputs.NetworkClient`) had to be updated to accept the context, which required refactoring in most of the outputs to also accept a context on connect.
    
    The worker from libbeat/publisher/pipeline/client_worker.go now uses a context for it's cancellation instead of a channel,
    this context is also used when creating a connection to Elasticsearch.
    
    An integration test is added to ensure the
    ES output can always recover from network errors.
    
    (cherry picked from commit 4dfef8b)
    belimawr authored and mergify[bot] committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    fe051a3 View commit details
    Browse the repository at this point in the history