mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 00:26:53 +00:00
fix: resolve test conflicts and improve data scanner functionality
- Fix multi-threaded test conflicts in AHM heal integration tests - Remove global environment sharing to prevent test state pollution - Fix test_all_disk_method by clearing global disk map before test - Improve data scanner and cache value implementations - Update dependencies and resolve clippy warnings Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
@@ -28,7 +28,7 @@ pub enum HealChannelCommand {
|
||||
}
|
||||
|
||||
/// Heal request from admin to ahm
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct HealChannelRequest {
|
||||
/// Unique request ID
|
||||
pub id: String,
|
||||
@@ -120,7 +120,7 @@ pub async fn send_heal_command(command: HealChannelCommand) -> Result<(), String
|
||||
if let Some(sender) = get_heal_channel_sender() {
|
||||
sender
|
||||
.send(command)
|
||||
.map_err(|e| format!("Failed to send heal command: {}", e))?;
|
||||
.map_err(|e| format!("Failed to send heal command: {e}"))?;
|
||||
Ok(())
|
||||
} else {
|
||||
Err("Heal channel not initialized".to_string())
|
||||
@@ -175,13 +175,6 @@ pub fn create_heal_request_with_options(
|
||||
priority: Option<HealChannelPriority>,
|
||||
pool_index: Option<usize>,
|
||||
set_index: Option<usize>,
|
||||
scan_mode: Option<HealChannelScanMode>,
|
||||
remove_corrupted: Option<bool>,
|
||||
recreate_missing: Option<bool>,
|
||||
update_parity: Option<bool>,
|
||||
recursive: Option<bool>,
|
||||
dry_run: Option<bool>,
|
||||
timeout_seconds: Option<u64>,
|
||||
) -> HealChannelRequest {
|
||||
HealChannelRequest {
|
||||
id: Uuid::new_v4().to_string(),
|
||||
@@ -191,13 +184,7 @@ pub fn create_heal_request_with_options(
|
||||
priority: priority.unwrap_or_default(),
|
||||
pool_index,
|
||||
set_index,
|
||||
scan_mode,
|
||||
remove_corrupted,
|
||||
recreate_missing,
|
||||
update_parity,
|
||||
recursive,
|
||||
dry_run,
|
||||
timeout_seconds,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user