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 the task count check in TrafficController #11783

Open
wants to merge 3 commits into
base: branch-25.02
Choose a base branch
from

Conversation

jihoonson
Copy link
Collaborator

A follow-up to #11730. If that is the only task at the moment, the TrafficController should allow the task to process regardless of how much host memory it uses. However, this check was missing in the loop below, which would have all subsequent tasks hung if a task that uses a large memory is submitted while there are some tasks running.

        while (!throttle.canAccept(task)) { // <= task count check is missing
          condition.await()
        }

This PR fixes this bug. Additionally, it improves the TrafficController to use the condition variable instead of polling as suggested in #11730 (comment). Finally, the terminology in ThrottlingExecutorSuite has been fixed as suggested in #11730 (comment).

@jihoonson
Copy link
Collaborator Author

build

@jihoonson
Copy link
Collaborator Author

build

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