summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-10-01 20:31:58 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-10-01 20:31:58 +0200
commit0ca6d0240bc72e037325b86c93b786fc3463b17f (patch)
tree5da76395f534286354e427f13d9144610417043a /vespaclient-container-plugin
parentf1aa2bb7fa9342c6dfdd0bf29b645d48e37247cb (diff)
Shut down forcibly earlier
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
index a4a36026fc5..e25a2215b9b 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
@@ -148,11 +148,11 @@ public class DocumentOperationExecutorImpl implements DocumentOperationExecutor
/** Assumes this stops receiving operations roughly when this is called, then waits up to 50 seconds to drain operations. */
@Override
public void shutdown() {
- long shutdownMillis = clock.instant().plusSeconds(50).toEpochMilli();
+ long shutdownMillis = clock.instant().plusSeconds(20).toEpochMilli();
visits.values().forEach(VisitorSession::destroy);
- Future<?> throttleShutdown = throttled.shutdown(Duration.ofSeconds(30),
+ Future<?> throttleShutdown = throttled.shutdown(Duration.ofSeconds(10),
context -> context.error(OVERLOAD, "Retry on overload failed due to shutdown"));
- Future<?> timeoutShutdown = timeouts.shutdown(Duration.ofSeconds(40),
+ Future<?> timeoutShutdown = timeouts.shutdown(Duration.ofSeconds(15),
context -> context.error(TIMEOUT, "Timed out due to shutdown"));
try {
throttleShutdown.get(Math.max(0, shutdownMillis - clock.millis()), TimeUnit.MILLISECONDS);