Update Firestore Quickstart to use exec:exec #1523
Merged
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.
When exec-maven-plugin runs the
exec:java
goal, it executes the javaprogram in the maven process (there currently isn't an option to fork
instead of running it in process). As a side effect of this, shutdown
hooks are not run when the program has completed running. In the case
of our Quickstart that means the daemon thread for grpc and gax do not
shutdown when the program has completed running, resulting in maven
listing all the threads that are still running and showing a stacktrace.
This change uses
exec:exec
and manually builds the java command to berun, thereby forcing the program to be ran in a forked process and able
to use the normal shutdown process.
Attached are a logs showing the following
exec:java
exec:java
exec:exec
exec_java.log
exec_java_thread_dump.log
exec_exec.log