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

[receiver/kafka] Fix bug that was blocking shutdown #32720

Merged

Conversation

crobert-1
Copy link
Member

Description:

The kafka receiver's shutdown method is to cancel the context of a running sub goroutine. However, a small bug was causing a fatal error to be reported during shutdown when this expected condition was hit. The fatal error being reported during shutdown was causing another bug to be hit, open-telemetry/opentelemetry-collector#9824.

This fix means that shutdown won't be blocked in expected shutdown conditions, but the core bug referenced above means shutdown will still be block in unexpected error situations.

This fix is being taken from a comment made by @Dennis8274 on the issue.

Link to tracking Issue:
Fixes #30789

Testing:
Stepped through TestTracesReceiverStart in a debugger before the change to see the fatal status being reported. It was no longer reported after applying the fix. Manually tested running the collector with a kafka receiver and saw that before the fix it was indeed being blocked on a normal shutdown, but after the fix it shutdown as expected.

receiver/kafkareceiver/kafka_receiver.go Outdated Show resolved Hide resolved
receiver/kafkareceiver/kafka_receiver.go Outdated Show resolved Hide resolved
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 20, 2024
@fatsheep9146 fatsheep9146 added ready to merge Code review completed; ready to merge by maintainers and removed Stale labels May 20, 2024
@MovieStoreGuy MovieStoreGuy merged commit 606e024 into open-telemetry:main May 22, 2024
174 of 175 checks passed
@github-actions github-actions bot added this to the next release milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/kafka
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka receiver stuck while shutting down at v0.93.0
6 participants