Terminal State Job Purging#1231
Merged
alirezazamani merged 5 commits intoapache:masterfrom Aug 13, 2020
Merged
Conversation
junkaixue
reviewed
Aug 7, 2020
alirezazamani
requested changes
Aug 7, 2020
alirezazamani
approved these changes
Aug 13, 2020
Contributor
Author
|
This PR is ready to merge, approved by @alirezazamani Terminal State Job Purging in TaskFrameworkThis PR added a new field to JobConfig for terminal job expiries, and added new logic to garbage collection stage to purge jobs in terminal states. |
huizhilu
pushed a commit
to huizhilu/helix
that referenced
this pull request
Aug 16, 2020
This commit added a new field to JobConfig for terminal job expiries, and added new logic to garbage collection stage to purge jobs in terminal states.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issues
Fixes #1230
Description
Here are some details about my PR, including screenshots of any UI changes:
A new field is added to JobConfig in order to support terminal state job purging: TerminalStateExpiry. Necessary functions are implemented to support the new field.
A new set of logic is added to TaskGarbageCollectionStage. When purging jobs, terminal state jobs will be considered based on the new expiry value. In addition, a "failed job propagation" logic is put in place. This accounts for the jobs that fail due to parental job failures, because these jobs would not have JobContexts, preventing them to be purged through normal means; with the propagation logic they can be purged along with the failed parental jobs.
Modify scheduleJobCleanUp usage to correctly reflect the expiry used. The previous code wasn't necessary as FAILED jobs were not cleaned up anyways, but now it has a meaning.
Modify jobDispatcher to honor TIMED_OUT job states.
Tests
testJobQueueFailedCleanUp, testJobQueueTimedOutCleanUp, testGetExpiredJobsFromCacheFailPropagation
Rerun
Rerun
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)