-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Panic if Elasticsearch is unavailable during shutdown of the exporter #32317
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label help-wanted |
/label -needs-triage |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
This should not be the case now, as we have migrated to go-docappender and that the OnFailure handler is no longer used. |
Component(s)
exporter/elasticsearch
What happened?
Description
If Elasticsearch is unavailable on shutdown of the exporter then if there is data to be flushed in the exporter it will cause a panic.
Steps to Reproduce
Expected Result
No panic is observed
Actual Result
Panic is observed:
The root cause of the panic is the handling of bulk failures (ref). When the item fails then we try to push the item back into the bulk indexer, however, if the exporter is shutting down then the bulkindexer would already be closed and the flush (which led to the error) is due to ES not available on the final flush initiated by
Close
.Collector version
all
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
panic: send on closed channel goroutine 78 [running]: github.com/elastic/go-elasticsearch/v7/esutil.(*bulkIndexer).Add(0x14000334a80, {0x102586420, 0x1033c5460}, {{0x101f86420, 0x14}, {0x101f70693, 0x6}, {0x0, 0x0}, {0x0, ...}, ...})
Additional context
No response
The text was updated successfully, but these errors were encountered: