Skip to content

Commit 3d2f118

Browse files
authored
[nexus] decrease auto-restart cooldown to 5 minutes (#9097)
When an instance is automatically restarted, it will not be permitted to restart again until a cooldown period has elapsed since the previous restart. Currently, that cooldown period is one hour, in order to prevent situations where an instance that crashes every time it's restarted is restarted in a hot loop. However, when an instance is on a sled that is updated, it may then be restarted on another sled that is also updated, and the cooldown timer will apply to the subsequent restart. This means that during an update, some instances may not come back for an hour, which is sad. Therefore, this commit decreases the cooldown to 5 minutes, as discussed in #9094. Fixes #9083
1 parent cf4ef41 commit 3d2f118

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nexus/db-model/src/instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ pub enum Reincarnatability {
375375

376376
impl InstanceAutoRestart {
377377
/// The default cooldown used when an instance has no overridden cooldown.
378-
pub const DEFAULT_COOLDOWN: TimeDelta = match TimeDelta::try_hours(1) {
378+
pub const DEFAULT_COOLDOWN: TimeDelta = match TimeDelta::try_minutes(5) {
379379
Some(delta) => delta,
380-
None => unreachable!(), // 1 hour should be representable...
380+
None => unreachable!(), // 5 minutes should be representable...
381381
};
382382

383383
/// The default policy used when an instance does not override the

0 commit comments

Comments
 (0)