-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add test for elasticsearch re-connection after network error & allow graceful shutdown #40794
Merged
Commits on Oct 22, 2024
-
Fix elasticsearch re-connection after network error
When the Elasticsearch client fails to publish events, it ends up calling `Close` in the connection (that is reused). To cancel the in-flight requests, the context is cancelled and a new one is created to used in future requests. The callback to check the version holds a reference to the connection via a closure, now the Elasticsearch client holds a pointer to that connection, so whenever Close is called, the callback can create a request with the new, not cancelled, context. An integration test is added to ensure the ES output can always recover from network errors.
Configuration menu - View commit details
-
Copy full SHA for c5bb19c - Browse repository at this point
Copy the full SHA c5bb19cView commit details -
Move creating the request context to Connect
This commit moves the creation of the request context to the connect method.
Configuration menu - View commit details
-
Copy full SHA for 1e02543 - Browse repository at this point
Copy the full SHA 1e02543View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59541dc - Browse repository at this point
Copy the full SHA 59541dcView commit details -
Initialise reqsContext in NewConnections
There are some cases where the Connection will be used without calling Connect, so we initialise reqsContext and cancelReqs in the NewConnection function to avoid panics.
Configuration menu - View commit details
-
Copy full SHA for 76d986b - Browse repository at this point
Copy the full SHA 76d986bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe2140a - Browse repository at this point
Copy the full SHA fe2140aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8411f9 - Browse repository at this point
Copy the full SHA f8411f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for fcab79c - Browse repository at this point
Copy the full SHA fcab79cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b41bb6 - Browse repository at this point
Copy the full SHA 4b41bb6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d76c0d2 - Browse repository at this point
Copy the full SHA d76c0d2View commit details -
Connection.Connect now accepts a context to control the life cycle of its requests.
Configuration menu - View commit details
-
Copy full SHA for 6cef800 - Browse repository at this point
Copy the full SHA 6cef800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e74ea4 - Browse repository at this point
Copy the full SHA 2e74ea4View commit details -
Add context to outputs.Connectable interface
Add a context to outputs.Connectable.Connect to correctly manage the life cycle of the connection and it's requests.
Configuration menu - View commit details
-
Copy full SHA for 198b01b - Browse repository at this point
Copy the full SHA 198b01bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc20198 - Browse repository at this point
Copy the full SHA fc20198View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ca5b9c - Browse repository at this point
Copy the full SHA 3ca5b9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b962d2 - Browse repository at this point
Copy the full SHA 5b962d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 459b869 - Browse repository at this point
Copy the full SHA 459b869View commit details -
Configuration menu - View commit details
-
Copy full SHA for eee35b7 - Browse repository at this point
Copy the full SHA eee35b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab39277 - Browse repository at this point
Copy the full SHA ab39277View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f6edcc - Browse repository at this point
Copy the full SHA 5f6edccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09c7581 - Browse repository at this point
Copy the full SHA 09c7581View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a56f6e - Browse repository at this point
Copy the full SHA 8a56f6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f04323 - Browse repository at this point
Copy the full SHA 5f04323View commit details -
Configuration menu - View commit details
-
Copy full SHA for f03154b - Browse repository at this point
Copy the full SHA f03154bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3502a3 - Browse repository at this point
Copy the full SHA f3502a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e09644 - Browse repository at this point
Copy the full SHA 5e09644View commit details -
Configuration menu - View commit details
-
Copy full SHA for f79c8a6 - Browse repository at this point
Copy the full SHA f79c8a6View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.