20260416_2 并行优化phase1后进行snapshot fast path优化,通过四方面关键优化技术消除了验证主链路上snapshot构建是的db访问性能热点问题,性能热点转移到ROA验证处理本身,目前APNIC+ARIN全量同步从500秒压缩到212秒,离rpkclient 112秒差距变小

This commit is contained in:
2026-04-17 14:58:47 +08:00
parent 38421b1ae7
commit 224ae10052
36 changed files with 2935 additions and 937 deletions

View File

@@ -218,9 +218,12 @@ pub fn process_publication_point_for_issuer<P: PublicationPointData>(
.iter()
.filter(|f| f.rsync_uri.ends_with(".crl"))
.map(|f| {
let bytes = f
.bytes_cloned()
.expect("snapshot CRL bytes must be loadable");
(
f.rsync_uri.clone(),
CachedIssuerCrl::Pending(f.bytes.clone()),
CachedIssuerCrl::Pending(bytes),
)
})
.collect();
@@ -518,6 +521,9 @@ pub fn process_publication_point_snapshot_for_issuer(
#[derive(Debug, thiserror::Error)]
enum ObjectValidateError {
#[error("object bytes load failed: {0}")]
BytesLoad(String),
#[error("ROA decode failed: {0}")]
RoaDecode(#[from] RoaDecodeError),
@@ -584,7 +590,7 @@ fn process_roa_with_issuer(
let _decode = timing
.as_ref()
.map(|t| t.span_phase("objects_roa_decode_and_validate_total"));
let roa = RoaObject::decode_der(&file.bytes)?;
let roa = RoaObject::decode_der(file.bytes().map_err(ObjectValidateError::BytesLoad)?)?;
drop(_decode);
let _ee_profile = timing
@@ -692,7 +698,7 @@ fn process_aspa_with_issuer(
let _decode = timing
.as_ref()
.map(|t| t.span_phase("objects_aspa_decode_and_validate_total"));
let aspa = AspaObject::decode_der(&file.bytes)?;
let aspa = AspaObject::decode_der(file.bytes().map_err(ObjectValidateError::BytesLoad)?)?;
drop(_decode);
let _ee_profile = timing