Fix issue with Gradle daemons hanging indefinitely on shutdown#44867
Merged
mark-vieira merged 3 commits intoelastic:masterfrom Jul 25, 2019
Merged
Fix issue with Gradle daemons hanging indefinitely on shutdown#44867mark-vieira merged 3 commits intoelastic:masterfrom
mark-vieira merged 3 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra |
rjernst
reviewed
Jul 25, 2019
| clustersToWatch.removeAll(clustersToWatch); | ||
| } | ||
| public synchronized void unWatch(Collection<ElasticsearchCluster> cluster) { | ||
| clustersToWatch.removeAll(clustersToWatch); |
Member
There was a problem hiding this comment.
Shouldn't this be clustersToWatch.removeAll(cluster)? (note, the name cluster shoudl really be plural since it is a collection?
Contributor
Author
There was a problem hiding this comment.
Good catch. Looks like we were never actually registering this clusters to be watched.
This was referenced Jul 25, 2019
mark-vieira
added a commit
to mark-vieira/elasticsearch
that referenced
this pull request
Jul 25, 2019
mark-vieira
added a commit
to mark-vieira/elasticsearch
that referenced
this pull request
Jul 25, 2019
mark-vieira
added a commit
that referenced
this pull request
Jul 25, 2019
mark-vieira
added a commit
that referenced
this pull request
Jul 25, 2019
jkakavas
pushed a commit
that referenced
this pull request
Jul 31, 2019
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.
This PR fixes and issue folks were reporting where Gradle daemons would be hung, such that the processes were still running but commands like
gradle --stopdidn't report them as running. The issue was were were inadvertently registering a shutdown hook that never completes. This caused the daemon on shutdown to unregister itself from the daemon registry (so it would never be reused) but the JVM would never actually exit.