Skip to content

Conversation

@ssalinas
Copy link
Member

In looking through the code, there was a path that could cause us to build up an unnecessary amount of open uploaders if a large count of failed tasks ended up on the same host. In the current cleanup setup, because we were preserving the task app directory, we would short circuit before hitting any lines that finalized uploaders, allowing them to run to completion in the S3Uploader. Since the task is finished, there is no reason to keep the uploader files open

This also cleans up a few noisier exceptions and log statements that aren't adding a ton of value across the different runnables

Comment on lines +161 to +162
} catch (UncheckedIOException|NoSuchFileException nsfe) {
LOG.debug("Parent file {} did not exist, skipping", directory);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because some directories we scanned contain tmp files, so even though we checked for the directory directly above this, it's possible it got deleted out from under us before we started the filesystem walk

}

boolean cleanupTaskAppDirectorySuccess = cleanupTaskAppDirectory();
boolean logTearDownSuccess = taskLogManager.teardown();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the important line to move @baconmania . This shouldn't delete any log files, so the previous logging PR is still in effect. But it moves the task app directory cleanup to the end, so that we don't wait forever to clean logs just because we haven't cleaned taskapp yet

@ssalinas ssalinas added the hs_qa label Mar 19, 2020
@pschoenfelder
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit 29a128d into master Mar 20, 2020
@ssalinas ssalinas deleted the s3_uploader_improvements branch March 20, 2020 14:11
@ssalinas ssalinas added this to the 1.3.0 milestone Sep 24, 2020
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.

3 participants