20260416_2 并行优化phase1后进行snapshot fast path优化,通过四方面关键优化技术消除了验证主链路上snapshot构建是的db访问性能热点问题,性能热点转移到ROA验证处理本身,目前APNIC+ARIN全量同步从500秒压缩到212秒,离rpkclient 112秒差距变小
This commit is contained in:
@@ -113,7 +113,7 @@ fn build_cernet_pack_and_validation_time() -> (
|
||||
.iter()
|
||||
.find(|f| f.rsync_uri.ends_with(".crl"))
|
||||
.expect("crl present in snapshot");
|
||||
let crl = RpkixCrl::decode_der(&crl_file.bytes).expect("decode crl");
|
||||
let crl = RpkixCrl::decode_der(crl_file.bytes().expect("load crl bytes")).expect("decode crl");
|
||||
|
||||
// Choose a validation_time that is within:
|
||||
// - manifest thisUpdate..nextUpdate (RFC 9286 §6.3)
|
||||
@@ -151,7 +151,9 @@ fn drop_object_policy_drops_only_failing_object() {
|
||||
.expect("another ROA present in snapshot");
|
||||
let victim_uri = pack.files[tamper_idx].rsync_uri.clone();
|
||||
|
||||
let mut tampered = pack.files[tamper_idx].bytes.clone();
|
||||
let mut tampered = pack.files[tamper_idx]
|
||||
.bytes_cloned()
|
||||
.expect("clone roa bytes");
|
||||
let last = tampered.len() - 1;
|
||||
tampered[last] ^= 0xFF;
|
||||
pack.files[tamper_idx] = PackFile::from_bytes_compute_sha256(victim_uri.clone(), tampered);
|
||||
@@ -194,7 +196,9 @@ fn drop_publication_point_policy_drops_the_publication_point() {
|
||||
.expect("a ROA present in snapshot");
|
||||
let victim_uri = pack.files[tamper_idx].rsync_uri.clone();
|
||||
|
||||
let mut tampered = pack.files[tamper_idx].bytes.clone();
|
||||
let mut tampered = pack.files[tamper_idx]
|
||||
.bytes_cloned()
|
||||
.expect("clone roa bytes");
|
||||
let last = tampered.len() - 1;
|
||||
tampered[last] ^= 0xFF;
|
||||
pack.files[tamper_idx] = PackFile::from_bytes_compute_sha256(victim_uri.clone(), tampered);
|
||||
|
||||
Reference in New Issue
Block a user