You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/11/22 21:06:00 UTC

[GitHub] [gobblin] arjun4084346 commented on a diff in pull request #3606: Clean staging

arjun4084346 commented on code in PR #3606:
URL: https://github.com/apache/gobblin/pull/3606#discussion_r1029819199


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -439,6 +450,7 @@ public void launchJob(JobListener jobListener)
       TimingEvent launchJobTimer = this.eventSubmitter.getTimingEvent(TimingEvent.LauncherTimings.FULL_JOB_EXECUTION);
 
       try (Closer closer = Closer.create()) {
+        addShutdownHook(closer);

Review Comment:
   the closer that is created in `try` is not closed when there is a kill. `finally` blocks does not run when the jvm is abruptly stopping. Adding a shutdown hook makes sure that close is called in those cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org