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

[cmd/opampsupervisor] Fix restart delay when agent process exits unexpectedly #32150

Merged
merged 8 commits into from
Apr 16, 2024

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Apr 3, 2024

Description:

Reset should called only on stopped or expired timers with drained channels. If the timer already expired (and the channel was not cleared) it reads from the timer's channel to clear it.

Link to tracking Issue: Fixes #27891

Testing:

Documentation:

@srikanthccv srikanthccv marked this pull request as ready for review April 3, 2024 16:32
@srikanthccv srikanthccv requested a review from a team April 3, 2024 16:32
@tigrannajaryan tigrannajaryan changed the title [cmd/opampsupervisor] Fix restart delay when agent process exits unex… [cmd/opampsupervisor] Fix restart delay when agent process exits unexpectedly Apr 3, 2024
Copy link
Contributor

@BinaryFissionGames BinaryFissionGames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this out, it resolves the issue.

Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really excited to have this fixed, thanks.

I think the way we're handling channels is the best we can do, but looks a little funny. I just added a few suggestions to explain why we're doing what we are. If anyone else has ideas for more idiomatic ways to make these behave sensibly, I'm open to other suggestions.

srikanthccv and others added 2 commits April 16, 2024 08:50
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
@evan-bradley
Copy link
Contributor

@srikanthccv It looks like there's a linting error, could you look into it?

@evan-bradley evan-bradley merged commit 0a33a96 into open-telemetry:main Apr 16, 2024
170 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 16, 2024
@srikanthccv srikanthccv deleted the issue_27891 branch April 16, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart delay not working when agent process exits unexpectedly
4 participants