20260607 完成transport预热、roa cache和finalize长尾优化
This commit is contained in:
@@ -5,7 +5,8 @@ use std::path::{Path, PathBuf};
|
||||
use rocksdb::{DB, IteratorMode, Options};
|
||||
use rpki::storage::{
|
||||
ALL_COLUMN_FAMILY_NAMES, CF_MANIFEST_REPLAY_META, CF_RAW_BY_HASH, CF_REPOSITORY_VIEW,
|
||||
CF_RRDP_SOURCE, CF_RRDP_SOURCE_MEMBER, CF_RRDP_URI_OWNER, CF_VCIR, column_family_descriptors,
|
||||
CF_ROA_CACHE_PROJECTION, CF_RRDP_SOURCE, CF_RRDP_SOURCE_MEMBER, CF_RRDP_URI_OWNER,
|
||||
CF_TRANSPORT_PREFETCH, CF_VCIR, column_family_descriptors,
|
||||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
@@ -98,7 +99,7 @@ Output:
|
||||
|
||||
Output groups:
|
||||
- current_repository_view: repository_view + raw_by_hash
|
||||
- current_validation_state: vcir + manifest_replay_meta
|
||||
- current_validation_state: vcir + manifest_replay_meta + roa_cache_projection + transport_prefetch
|
||||
- current_rrdp_state: rrdp_source + rrdp_source_member + rrdp_uri_owner
|
||||
"
|
||||
)
|
||||
@@ -182,7 +183,9 @@ fn collect_db_file_stats(db_path: &Path) -> Result<DbFileStats, Box<dyn std::err
|
||||
fn cf_group(cf_name: &str) -> CfGroup {
|
||||
match cf_name {
|
||||
CF_REPOSITORY_VIEW | CF_RAW_BY_HASH => CfGroup::CurrentRepositoryView,
|
||||
CF_VCIR | CF_MANIFEST_REPLAY_META => CfGroup::CurrentValidationState,
|
||||
CF_VCIR | CF_MANIFEST_REPLAY_META | CF_ROA_CACHE_PROJECTION | CF_TRANSPORT_PREFETCH => {
|
||||
CfGroup::CurrentValidationState
|
||||
}
|
||||
CF_RRDP_SOURCE | CF_RRDP_SOURCE_MEMBER | CF_RRDP_URI_OWNER => CfGroup::CurrentRrdpState,
|
||||
_ => CfGroup::LegacyCompatibility,
|
||||
}
|
||||
@@ -374,6 +377,14 @@ mod tests {
|
||||
cf_group(CF_MANIFEST_REPLAY_META),
|
||||
CfGroup::CurrentValidationState
|
||||
);
|
||||
assert_eq!(
|
||||
cf_group(CF_ROA_CACHE_PROJECTION),
|
||||
CfGroup::CurrentValidationState
|
||||
);
|
||||
assert_eq!(
|
||||
cf_group(CF_TRANSPORT_PREFETCH),
|
||||
CfGroup::CurrentValidationState
|
||||
);
|
||||
assert_eq!(cf_group(CF_RRDP_SOURCE), CfGroup::CurrentRrdpState);
|
||||
assert_eq!(cf_group(CF_RRDP_URI_OWNER), CfGroup::CurrentRrdpState);
|
||||
assert_eq!(cf_group("unknown_legacy"), CfGroup::LegacyCompatibility);
|
||||
@@ -386,11 +397,12 @@ mod tests {
|
||||
(CF_RAW_BY_HASH, 7),
|
||||
(CF_VCIR, 11),
|
||||
(CF_MANIFEST_REPLAY_META, 13),
|
||||
(CF_ROA_CACHE_PROJECTION, 17),
|
||||
(CF_RRDP_SOURCE_MEMBER, 19),
|
||||
]);
|
||||
|
||||
assert_eq!(grouped.get(&CfGroup::CurrentRepositoryView), Some(&12));
|
||||
assert_eq!(grouped.get(&CfGroup::CurrentValidationState), Some(&24));
|
||||
assert_eq!(grouped.get(&CfGroup::CurrentValidationState), Some(&41));
|
||||
assert_eq!(grouped.get(&CfGroup::CurrentRrdpState), Some(&19));
|
||||
assert_eq!(grouped.get(&CfGroup::LegacyCompatibility), None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user