fix(yarn): retain all deletionTasks in rolling log aggregation - #8705
Open
shoemoney wants to merge 1 commit into
Open
fix(yarn): retain all deletionTasks in rolling log aggregation#8705shoemoney wants to merge 1 commit into
shoemoney wants to merge 1 commit into
Conversation
Fix verified RED->GREEN. YARN-11963 rolling log aggregation leaks local files - single deletionTask overwritten per loop only last container deleted
|
💔 -1 overall
This message was automatically generated. |
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.
Description of PR
Fixes YARN-11963. Rolling log aggregation leaked local container log files
because
AppLogAggregatorImplreused a singleDeletionTaskvariable insidethe per-container loop, overwriting it on each iteration. Only the last
container's log directory was ever scheduled for deletion, so files for every
earlier container in the same aggregation cycle were left on disk.
The fix collects one
FileDeletionTaskper container into aList<DeletionTask>and, when aggregation succeeds, submits every task in thelist from the
finallyblock instead of a single overwritten reference.How was this patch tested?
No new test was added. This is a fix to loop logic in
AppLogAggregatorImplwhere the bug (overwritingdeletionTaskperiteration) is only reachable when a rolling aggregation cycle processes more
than one container, and asserting on scheduled
DeletionTasksubmissionsrequires the existing
DeletionServicemock scaffolding used byTestLogAggregationService. Given the size and locality of the change, Iverified it by:
AppLogAggregatorImplto confirm the original codeassigned
deletionTaskinside the loop, so each iteration discarded theprevious container's task.
entry in the list is passed to
delService.delete(...)in thefinallyblock.
hadoop-yarn-server-nodemanagerunit tests, whichpass unchanged with the patch.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles? (not applicable)