Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix 846 Formatter leaks threads and memory#847

Closed
stiemannkj1 wants to merge 1 commit intogoogle:mastergoogle/google-java-format:masterfrom
stiemannkj1:fix-846-mem-thread-leakstiemannkj1/google-java-format:fix-846-mem-thread-leakCopy head branch name to clipboard
Closed

Fix 846 Formatter leaks threads and memory#847
stiemannkj1 wants to merge 1 commit intogoogle:mastergoogle/google-java-format:masterfrom
stiemannkj1:fix-846-mem-thread-leakstiemannkj1/google-java-format:fix-846-mem-thread-leakCopy head branch name to clipboard

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
@stiemannkj1 stiemannkj1 force-pushed the fix-846-mem-thread-leak branch from 7e12876 to db89e6a Compare October 31, 2022 18:07
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 stiemannkj1 force-pushed the fix-846-mem-thread-leak branch from e61f7d9 to 0ca1e9b Compare February 3, 2023 14:59
@stiemannkj1 stiemannkj1 requested a review from cushon February 3, 2023 15:00
@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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.