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

Use timer instead of context for query no poller wait #6519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dnr
Copy link
Member

@dnr dnr commented Sep 13, 2024

What changed?

Tweak the "return special error if no recent poller when we're near the deadline" logic:

  • Use a one-shot timer instead of a context.
  • Move it into the loop so that it also can activate in the errForwarderSlowDown case.

Why?

  • Context Done channels are closed, so it becomes a busy loop after close. A timer is more efficient here anyway.
  • Use the logic in more potential situations for better error messages.

How did you test it?

Existing tests. The previous code had correct behavior besides the busy loop.

@dnr dnr requested a review from a team as a code owner September 13, 2024 23:33
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.

1 participant