You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Add warnings about incomplete analysis sections
367
+
letmut incomplete_sections = Vec::new();
368
+
369
+
if metrics.schema_evolution.is_none(){
370
+
incomplete_sections.push("Schema Evolution");
371
+
}
372
+
if metrics.time_travel_metrics.is_none(){
373
+
incomplete_sections.push("Time Travel");
374
+
}
375
+
if metrics.table_constraints.is_none(){
376
+
incomplete_sections.push("Table Constraints");
377
+
}
378
+
if metrics.file_compaction.is_none(){
379
+
incomplete_sections.push("File Compaction");
380
+
}
381
+
382
+
if !incomplete_sections.is_empty(){
383
+
metrics.recommendations.push(format!(
384
+
"⚠️ Analysis incomplete: {} sections could not be analyzed due to missing/inaccessible metadata files (common in actively updated tables). Basic metrics are still accurate.",
385
+
incomplete_sections.join(", ")
386
+
));
387
+
}
388
+
366
389
// Check for unreferenced files
367
390
if !metrics.unreferenced_files.is_empty(){
368
391
metrics.recommendations.push(format!(
@@ -698,8 +721,16 @@ impl IcebergAnalyzer {
698
721
});
699
722
700
723
for metadata_file in&sorted_files {
701
-
let content = self.s3_client.get_object(&metadata_file.key).await?;
702
-
let metadata:Value = serde_json::from_slice(&content)?;
724
+
// Try to get the metadata file, but skip if it doesn't exist (race condition)
725
+
let content = matchself.s3_client.get_object(&metadata_file.key).await{
726
+
Ok(c) => c,
727
+
Err(_) => continue,
728
+
};
729
+
730
+
let metadata:Value = match serde_json::from_slice(&content){
731
+
Ok(m) => m,
732
+
Err(_) => continue,
733
+
};
703
734
704
735
// Check for schema changes in metadata
705
736
ifletSome(schema) = metadata.get("schema"){
@@ -930,8 +961,16 @@ impl IcebergAnalyzer {
930
961
931
962
// Analyze metadata files for time travel storage
932
963
for metadata_file in metadata_files {
933
-
let content = self.s3_client.get_object(&metadata_file.key).await?;
934
-
let metadata:Value = serde_json::from_slice(&content)?;
964
+
// Try to get the metadata file, but skip if it doesn't exist (race condition)
965
+
let content = matchself.s3_client.get_object(&metadata_file.key).await{
966
+
Ok(c) => c,
967
+
Err(_) => continue,
968
+
};
969
+
970
+
let metadata:Value = match serde_json::from_slice(&content){
0 commit comments