diff options
author | Harald Musum <musum@yahooinc.com> | 2023-03-07 11:32:49 +0100 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2023-03-07 11:32:49 +0100 |
commit | c80b55b534558ab4a01441774a0f60a8d87ab66f (patch) | |
tree | 6fff9fa7487f08f3a1b250bf46bbd69832233d70 /configserver | |
parent | ad3f5edcb4d86886a7f6c52c26449e683e1d3a67 (diff) |
Wait longer for all users of barrier.
Use logic from RemoveApplicationWaiter in CuratorCompletionWaiter as well:
Wait some time after quorum have reached barrier to see if another member
reaches barrier as well. Return anyway after some time.
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java index 8f3bc83984a..09a687657c6 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java @@ -418,8 +418,9 @@ public class TenantApplications implements RequestHandler, HostValidator { /** * Waiter for removing application. Will wait for some time for all servers to remove application, - * but will accept majority of servers to have removed app if it takes a long time. + * but will accept the majority of servers to have removed app if it takes a long time. */ + // TODO: Merge with CuratorCompletionWaiter static class RemoveApplicationWaiter implements CompletionWaiter { private static final java.util.logging.Logger log = Logger.getLogger(RemoveApplicationWaiter.class.getName()); @@ -485,7 +486,7 @@ public class TenantApplications implements RequestHandler, HostValidator { gotQuorumTime = clock.instant(); // Give up if more than some time has passed since we got quorum, otherwise continue - if (Duration.between(Instant.now(), gotQuorumTime.plus(waitForAll)).isNegative()) { + if (Duration.between(clock.instant(), gotQuorumTime.plus(waitForAll)).isNegative()) { logBarrierCompleted(respondents, startTime); break; } |