Job scheduler fixes related to global timeout and status check #331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Issue] Briefly discuss the summary of the changes made in this
pull request in 2-3 lines.
The submitted job has timeout of 3 hours for status check. Recently we have observed jobs are getting into long queued state and did not start. Eventually they are getting killed after 3 hours of status check. As a result overall runtime of jobs scheduler increased and going beyond 2 days. We had global timeout as part of jobs status check which was removed as part of the PR - https://github.com/linkedin/openhouse/pull/319/files#diff-8227a7ab323e96994351616f8ad5502bfb93ee277a579a0e7dccc82591803cabL176. This is the recent change in status check so my original thinking was the issue around removal of the explicit global timeout. But it seems like this is not the issue. That means the issue existed in the earlier code as well. Suspecting that status poller thread is not interruptible through future.cancel. So making the code interruptible so that the thread exits on interrupt.
Changes
For all the boxes checked, please include additional details of the changes made in this pull request.
Testing Done
Local builds passed and verified exiting tests. The issues are on Prod and staging cluster and based on that these fixes are added.
For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.
Additional Information
For all the boxes checked, include additional details of the changes made in this pull request.