diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-16 15:46:25 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-16 15:46:25 +0200 |
commit | 7587a5fabbf2c97b59582ccc5960972deebec93e (patch) | |
tree | a6b08c2610f75188e1d859327a81a6388f42c673 /controller-server | |
parent | 6da6659519d6c1c918f10bc9c858deaad9e9b381 (diff) |
Add force option to overwrite inflight request
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java index 3c7c5f6ac30..77e49933d2c 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java @@ -2086,7 +2086,8 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler { if (report != null) { Cursor cursor = report.get(); // Note: same behaviour for both value '0' and missing value. - if (cursor.field("failedAt").asLong() == 0 && cursor.field("completedAt").asLong() == 0) { + boolean force = request.getBooleanProperty("force"); + if (!force && cursor.field("failedAt").asLong() == 0 && cursor.field("completedAt").asLong() == 0) { throw new IllegalArgumentException("Service dump already in progress for " + cursor.field("configId").asString()); } } |