20260612 优化CIR在线累计恢复性能
This commit is contained in:
@@ -440,6 +440,8 @@ impl<'a> Rpkiv1PublicationPointRunner<'a> {
|
||||
warnings,
|
||||
objects,
|
||||
audit,
|
||||
cir_fresh_objects: Vec::new(),
|
||||
cir_cached_objects: Vec::new(),
|
||||
discovered_children,
|
||||
},
|
||||
snapshot_pack_ms,
|
||||
@@ -996,12 +998,33 @@ impl<'a> PublicationPointRunner for Rpkiv1PublicationPointRunner<'a> {
|
||||
&fresh_failure_audits,
|
||||
);
|
||||
let audit_build_ms = audit_build_started.elapsed().as_millis() as u64;
|
||||
let cir_cached_objects =
|
||||
if projection.source == PublicationPointSource::VcirCurrentInstance {
|
||||
audit
|
||||
.objects
|
||||
.iter()
|
||||
.filter(|entry| {
|
||||
!fresh_failure_audits.iter().any(|fresh| fresh == *entry)
|
||||
})
|
||||
.cloned()
|
||||
.collect()
|
||||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
let result = PublicationPointRunResult {
|
||||
source: projection.source,
|
||||
snapshot: projection.snapshot,
|
||||
warnings,
|
||||
objects: projection.objects,
|
||||
audit,
|
||||
cir_fresh_objects: if projection.source
|
||||
== PublicationPointSource::VcirCurrentInstance
|
||||
{
|
||||
fresh_failure_audits
|
||||
} else {
|
||||
Vec::new()
|
||||
},
|
||||
cir_cached_objects,
|
||||
discovered_children: projection.discovered_children,
|
||||
};
|
||||
let total_duration_ms =
|
||||
@@ -1930,9 +1953,7 @@ fn build_publication_point_audit_from_snapshot(
|
||||
next_update_rfc3339_utc: pack.next_update.rfc3339_utc.clone(),
|
||||
verified_at_rfc3339_utc: pack.verified_at.rfc3339_utc.clone(),
|
||||
warnings,
|
||||
objects: objects_out.clone(),
|
||||
cir_fresh_objects: objects_out,
|
||||
cir_cached_objects: Vec::new(),
|
||||
objects: objects_out,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1989,8 +2010,6 @@ fn build_publication_point_audit_from_vcir(
|
||||
verified_at_rfc3339_utc: String::new(),
|
||||
warnings,
|
||||
objects: fresh_failure_audits.to_vec(),
|
||||
cir_fresh_objects: fresh_failure_audits.to_vec(),
|
||||
cir_cached_objects: Vec::new(),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2027,9 +2046,7 @@ fn build_publication_point_audit_from_vcir(
|
||||
.clone(),
|
||||
verified_at_rfc3339_utc: vcir.last_successful_validation_time.rfc3339_utc.clone(),
|
||||
warnings,
|
||||
objects: objects_out.clone(),
|
||||
cir_fresh_objects: objects_out,
|
||||
cir_cached_objects: Vec::new(),
|
||||
objects: objects_out,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2124,8 +2141,6 @@ fn build_publication_point_audit_from_vcir(
|
||||
verified_at_rfc3339_utc: vcir.last_successful_validation_time.rfc3339_utc.clone(),
|
||||
warnings,
|
||||
objects: audit_objects,
|
||||
cir_fresh_objects: fresh_failure_audits.to_vec(),
|
||||
cir_cached_objects: objects_out,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user