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

Fix 846 Formatter leaks threads and memory #847

Closed

Conversation

stiemannkj1
Copy link
Contributor

I've signed the CLA.

@stiemannkj1 stiemannkj1 force-pushed the fix-846-mem-thread-leak branch 3 times, most recently from 5fcb5e0 to 7e12876 Compare October 16, 2022 00:47
Copy link
Collaborator

@cushon cushon left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@stiemannkj1 stiemannkj1 force-pushed the fix-846-mem-thread-leak branch 2 times, most recently from 3671975 to e61f7d9 Compare February 3, 2023 14:58
@stiemannkj1
Copy link
Contributor Author

@cushon do I need to do anything to get the import/copybara workflow to complete?

@cushon
Copy link
Collaborator

cushon commented Feb 3, 2023

@cushon do I need to do anything to get the import/copybara workflow to complete?

Nope, thanks! I can take it from here


// #846 Clean up any resources and threads created by the executorService.
final boolean completedShutdown =
MoreExecutors.shutdownAndAwaitTermination(executorService, 100, TimeUnit.MILLISECONDS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm thinking to use a slightly longer deadline here, maybe 5 seconds.

This is just an FYI--I can make the change, no need to upload another snapshot.

// before shutdown, so no tasks should be left over by the time we shut down the executor
// service.
throw new IllegalStateException(
"Failed to complete all formatting tasks and shut down the formatter.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should print the message to stderr and return with a non-zero exit code, similar to the error handling on other code paths here.

copybara-service bot pushed a commit that referenced this pull request Feb 3, 2023
I've signed the CLA.

Fixes #847

FUTURE_COPYBARA_INTEGRATE_REVIEW=#847 from stiemannkj1:fix-846-mem-thread-leak 0ca1e9b
PiperOrigin-RevId: 506945523
copybara-service bot pushed a commit that referenced this pull request Feb 3, 2023
I've signed the CLA.

Fixes #847

FUTURE_COPYBARA_INTEGRATE_REVIEW=#847 from stiemannkj1:fix-846-mem-thread-leak 0ca1e9b
PiperOrigin-RevId: 506945523
copybara-service bot pushed a commit that referenced this pull request Feb 3, 2023
I've signed the CLA.

Fixes #847

FUTURE_COPYBARA_INTEGRATE_REVIEW=#847 from stiemannkj1:fix-846-mem-thread-leak 0ca1e9b
PiperOrigin-RevId: 506945523
copybara-service bot pushed a commit that referenced this pull request Feb 4, 2023
I've signed the CLA.

Fixes #847

FUTURE_COPYBARA_INTEGRATE_REVIEW=#847 from stiemannkj1:fix-846-mem-thread-leak 0ca1e9b
PiperOrigin-RevId: 506946916
@copybara-service copybara-service bot closed this in 91223aa Feb 4, 2023
@stiemannkj1 stiemannkj1 deleted the fix-846-mem-thread-leak branch February 10, 2023 19:58
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.

None yet

2 participants