diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2021-02-02 10:21:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 10:21:26 +0100 |
commit | 10a9d8ec4d23b0ec8d1fa58d1ba148258f5f2bcb (patch) | |
tree | 0b0d004cf9f15c5796bfae151252076c8bb1299e /controller-server | |
parent | dff4cbfa842deb2af18d45390c7fd6f78b7577e4 (diff) | |
parent | afd59b2cde4dd4fe9e09fdeddfc999c807f8aa98 (diff) |
Merge pull request #16324 from vespa-engine/jonmv/no-synch-work-in-job-runner-dispatch
Delegate blocking ops to executor in JobRunner
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunner.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunner.java index d6739581c79..73528977166 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunner.java @@ -80,10 +80,12 @@ public class JobRunner extends ControllerMaintainer { /** Advances each of the ready steps for the given run, or marks it as finished, and stashes it. Public for testing. */ public void advance(Run run) { if ( ! run.hasFailed() - && controller().clock().instant().isAfter(run.start().plus(jobTimeout))) { - jobs.abort(run.id()); - advance(jobs.run(run.id()).get()); - } + && controller().clock().instant().isAfter(run.start().plus(jobTimeout))) + executors.execute(() -> { + jobs.abort(run.id()); + advance(jobs.run(run.id()).get()); + }); + else if (run.readySteps().isEmpty()) executors.execute(() -> finish(run.id())); else |