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

Fix leaking timers in stream sources #4532

Merged
merged 1 commit into from Sep 14, 2023
Merged

Conversation

neilalexander
Copy link
Member

Repeated calls to scheduleSetSourceConsumerRetry could end up creating multiple timers for the same source, which would eventually schedule even more timers, which would result in runaway CPU usage. This PR instead bounds to one timer per source per stream.

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner September 14, 2023 09:31
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

L˝GTM

@neilalexander neilalexander merged commit 46361e8 into main Sep 14, 2023
2 checks passed
@neilalexander neilalexander deleted the neil/sourceretries branch September 14, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants