20260416_2 并行优化phase1后进行snapshot fast path优化,通过四方面关键优化技术消除了验证主链路上snapshot构建是的db访问性能热点问题,性能热点转移到ROA验证处理本身,目前APNIC+ARIN全量同步从500秒压缩到212秒,离rpkclient 112秒差距变小
This commit is contained in:
@@ -88,8 +88,6 @@ fn cli_run_offline_mode_writes_cir_and_static_pool() {
|
||||
let repo_dir = tempfile::tempdir().expect("repo tempdir");
|
||||
let out_dir = tempfile::tempdir().expect("out tempdir");
|
||||
let cir_path = out_dir.path().join("result.cir");
|
||||
let static_root = out_dir.path().join("static");
|
||||
|
||||
let policy_path = out_dir.path().join("policy.toml");
|
||||
std::fs::write(&policy_path, "sync_preference = \"rsync_only\"\n").expect("write policy");
|
||||
|
||||
@@ -117,8 +115,6 @@ fn cli_run_offline_mode_writes_cir_and_static_pool() {
|
||||
"--cir-enable".to_string(),
|
||||
"--cir-out".to_string(),
|
||||
cir_path.to_string_lossy().to_string(),
|
||||
"--cir-static-root".to_string(),
|
||||
static_root.to_string_lossy().to_string(),
|
||||
"--cir-tal-uri".to_string(),
|
||||
"https://example.test/root.tal".to_string(),
|
||||
];
|
||||
@@ -134,21 +130,6 @@ fn cli_run_offline_mode_writes_cir_and_static_pool() {
|
||||
.iter()
|
||||
.any(|item| item.rsync_uri.contains("apnic-rpki-root-iana-origin.cer"))
|
||||
);
|
||||
|
||||
let mut file_count = 0usize;
|
||||
let mut stack = vec![static_root.clone()];
|
||||
while let Some(path) = stack.pop() {
|
||||
for entry in std::fs::read_dir(path).expect("read_dir") {
|
||||
let entry = entry.expect("entry");
|
||||
let path = entry.path();
|
||||
if path.is_dir() {
|
||||
stack.push(path);
|
||||
} else {
|
||||
file_count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
assert!(file_count >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user