Fix duplicate data by clearing vectors before collection
All checks were successful
Build and Release / build-and-release (push) Successful in 1m19s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m19s
Collectors now clear their target vectors (tmpfs, drives, pools, services) before populating to prevent duplicates when updating cached AgentData. - Clear tmpfs list in memory collector - Clear drives and pools in disk collector - Clear services in systemd collector - Bump version to v0.1.231
This commit is contained in:
@@ -66,6 +66,10 @@ impl DiskCollector {
|
||||
|
||||
/// Collect all storage data and populate AgentData
|
||||
async fn collect_storage_data(&self, agent_data: &mut AgentData) -> Result<(), CollectorError> {
|
||||
// Clear drives and pools to prevent duplicates when updating cached data
|
||||
agent_data.system.storage.drives.clear();
|
||||
agent_data.system.storage.pools.clear();
|
||||
|
||||
// Step 1: Get mount points and their backing devices
|
||||
let mount_devices = self.get_mount_devices().await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user