fix(cluster): improve shard reconstruction validation and start background healing service

This commit is contained in:
2026-03-21 22:19:51 +00:00
parent a009d990d0
commit cea3407777
8 changed files with 57 additions and 27 deletions
+12
View File
@@ -256,6 +256,18 @@ impl HealingService {
}
};
// Verify reconstructed shards are consistent
if !self.erasure_coder.verify(&all_shards).unwrap_or(false) {
tracing::error!(
bucket = manifest.bucket,
key = manifest.key,
chunk = chunk.chunk_index,
"Shard verification failed after reconstruction"
);
stats.errors += 1;
continue;
}
// Write the missing shards to the first available local drive
for affected_placement in &affected {
let shard_idx = affected_placement.shard_index as usize;