Reduce warmup time with one second to avoid lockstep with tick
Reduce the chance of using an extra tick when there are some milliseconds
left of warmup time
@@ -52,7 +52,8 @@ public class NodeAgentImpl implements NodeAgent {
private static final long BYTES_IN_GB = 1_000_000_000L;
// Container is started with uncapped CPU and is kept that way until the first successful health check + this duration
- private static final Duration DEFAULT_WARM_UP_DURATION = Duration.ofMinutes(1);
+ // Subtract 1 second to avoid warmup coming in lockstep with tick time and always end up using an extra tick when there are just a few ms left
+ private static final Duration DEFAULT_WARM_UP_DURATION = Duration.ofMinutes(1).minus(Duration.ofSeconds(1));
private static final Logger logger = Logger.getLogger(NodeAgentImpl.class.getName());
