mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 03:46:37 +00:00
fix(heal): recover renewed disk health checks (#3366)
* fix(heal): recover renewed disk health checks * test(heal): cover replaced remote disk rebuild --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -649,6 +649,11 @@ impl LocalDiskWrapper {
|
||||
self.health.reset_for_store_init_retry(&self.disk.endpoint());
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn health_check_enabled_for_test(&self) -> bool {
|
||||
self.health_check
|
||||
}
|
||||
|
||||
/// Enable health monitoring after disk creation.
|
||||
/// Used to defer health checks until after startup format loading completes.
|
||||
pub fn enable_health_check(&self) {
|
||||
|
||||
@@ -435,6 +435,14 @@ impl Disk {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn health_check_enabled_for_test(&self) -> bool {
|
||||
match self {
|
||||
Disk::Local(local_disk) => local_disk.health_check_enabled_for_test(),
|
||||
Disk::Remote(remote_disk) => remote_disk.health_check_enabled_for_test(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn record_capacity_probe(&self, total: u64, used: u64, free: u64) {
|
||||
match self {
|
||||
Disk::Local(local_disk) => local_disk.record_capacity_probe(total, used, free),
|
||||
|
||||
Reference in New Issue
Block a user