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

ConnectionPool Waiter should store its timeout task #1380

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Mar 30, 2022

Motivation:

Connection pool waiters have a scheduled tasks for to timeout waiting.
This is cancelled and set to nil when the waiter is succeeded or
failed. Hoever, when scheduling a task the task was never stored! This
would lead to the potentially firing when the deadline expired although
the effect of this would be a no-op.

Modifications:

  • Capture the waiters scheduled task
  • Add a test

Result:

Cancelled tasks are actually cancelled.

Motivation:

Connection pool waiters have a scheduled tasks for to timeout waiting.
This is cancelled and set to `nil` when the waiter is succeeded or
failed. Hoever, when scheduling a task the task was never stored! This
would lead to the potentially firing when the deadline expired although
the effect of this would be a no-op.

Modifications:

- Capture the waiters scheduled task
- Add a test

Result:

Cancelled tasks are actually cancelled.
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Mar 30, 2022
Copy link
Collaborator

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

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

LGTM!

@glbrntt glbrntt merged commit 742e8ec into grpc:main Mar 30, 2022
@glbrntt glbrntt deleted the gb-capture-waiter-scheduled-task branch March 30, 2022 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants