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

Correct timeout logic #2825

Closed
wants to merge 1 commit into from
Closed

Conversation

esantorella
Copy link
Contributor

Summary:
Context:
D61930178 introduced incorrect timeout logic. At each iteration, the time remaining was decremented by the total amount of time elapsed so far. So if there were n iterations that each took 1 second, the time remaining would be decremented by n * (n + 1) / 2 seconds, rather than n seconds. This was also happening silently, whereas timing out within Scheduler would log a warning.

This diff:

  • Fixes the timeout logic
  • Logs a warning

Differential Revision: D63920497

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 4, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63920497

Summary:

Context:
D61930178 introduced incorrect timeout logic. At each iteration, the time remaining was decremented by the *total* amount of time elapsed so far. So if there were n iterations that each took 1 second, the time remaining would be decremented by n * (n + 1) / 2 seconds, rather than n seconds. This was also happening silently, whereas timing out within Scheduler would log a warning.

This diff:
* Fixes the timeout logic
* Logs a warning

Reviewed By: sdaulton, Balandat

Differential Revision: D63920497
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63920497

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.71%. Comparing base (331da3a) to head (8daaabd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2825   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files         492      492           
  Lines       48583    48591    +8     
=======================================
+ Hits        46499    46507    +8     
  Misses       2084     2084           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c077378.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants