diff --git a/api/src/config.rs b/api/src/config.rs index 770b1b65e29..4823ec75485 100644 --- a/api/src/config.rs +++ b/api/src/config.rs @@ -944,7 +944,7 @@ pub struct MirrorConfig { pub failure_limit: u8, /// Elapsed time to pause mirror health check when the request is inactive, in seconds. #[serde(default = "default_check_pause_elapsed")] - pub check_pause_elapsed: u64, + pub health_check_pause_elapsed: u64, } impl Default for MirrorConfig { @@ -955,7 +955,7 @@ impl Default for MirrorConfig { health_check_interval: 5, failure_limit: 5, ping_url: String::new(), - check_pause_elapsed: 300, + health_check_pause_elapsed: 300, } } } diff --git a/docs/nydusd.md b/docs/nydusd.md index a2a434f45b9..bcd51f61231 100644 --- a/docs/nydusd.md +++ b/docs/nydusd.md @@ -358,7 +358,7 @@ Currently, the mirror mode is only tested in the registry backend, and in theory "failure_limit": 5, // Elapsed time to pause mirror health check when the request is inactive, in seconds. // Use 300 as default if left empty. - "check_pause_elapsed": 300, + "health_check_pause_elapsed": 300, }, { "host": "http://dragonfly2.io:65001", diff --git a/storage/src/backend/connection.rs b/storage/src/backend/connection.rs index 4883ffcf85d..75de84a3640 100644 --- a/storage/src/backend/connection.rs +++ b/storage/src/backend/connection.rs @@ -443,7 +443,7 @@ impl Connection { .as_secs() - last_active.load(Ordering::Relaxed); // If the connection is not active for a set time, skip mirror health check. - if elapsed <= mirror_cloned.config.check_pause_elapsed { + if elapsed <= mirror_cloned.config.health_check_pause_elapsed { // Try to recover the mirror server when it is unavailable. if !mirror_cloned.status.load(Ordering::Relaxed) { info!(