GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix 846 Formatter leaks threads and memory by stiemannkj1 · Pull Request #847 · google/google-java-format

Conversation

@stiemannkj1

@stiemannkj1 stiemannkj1 commented Oct 15, 2022

Copy link
Copy Markdown
Contributor

I've signed the CLA.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
cushon
cushon reviewed Feb 3, 2023
View reviewed changes
Comment thread core/src/main/java/com/google/googlejavaformat/java/Main.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

cushon
cushon requested changes Feb 3, 2023
View reviewed changes

@cushon cushon left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this 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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread core/src/test/java/com/google/googlejavaformat/java/MainTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@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
Fix google#846 Formatter leaks threads and memory
0ca1e9b
@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
cushon
cushon approved these changes Feb 3, 2023
View reviewed changes
@stiemannkj1

stiemannkj1 commented Feb 3, 2023

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cushon

cushon commented Feb 3, 2023

Copy link
Copy Markdown
Collaborator

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

Nope, thanks! I can take it from here

stiemannkj1 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cushon
cushon reviewed Feb 3, 2023
View reviewed changes
Comment thread core/src/main/java/com/google/googlejavaformat/java/Main.java

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

@cushon cushon Feb 3, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread core/src/main/java/com/google/googlejavaformat/java/Main.java
// 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.");

@cushon cushon Feb 3, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
copybara-service Bot pushed a commit that referenced this pull request Feb 3, 2023
@java-team-github-bot google-java-format Team
Fix 846 Formatter leaks threads and memory
8fc28a4
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 copybara-service Bot mentioned this pull request Feb 3, 2023
Fix 846 Formatter leaks threads and memory #889
Closed
copybara-service Bot pushed a commit that referenced this pull request Feb 3, 2023
@java-team-github-bot google-java-format Team
Fix 846 Formatter leaks threads and memory
a70d5b7
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
@java-team-github-bot google-java-format Team
Fix 846 Formatter leaks threads and memory
cb669e8
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
@cushon google-java-format Team
Fix #846 Formatter leaks threads and memory
3f6f7e1
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 mentioned this pull request Feb 4, 2023
Fix #846 Formatter leaks threads and memory #890
Merged
@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

Reviewers

@cushon cushon cushon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@stiemannkj1 @cushon
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.