20260801 并行控制面:stage worker池+CurrentRepoIndex RwLock化,--control-plane-stage-workers开关默认关闭(#138)

This commit is contained in:
2026-08-01 20:37:53 +08:00
parent f6a2d3a593
commit 3d7e18a238
14 changed files with 1653 additions and 345 deletions

View File

@@ -511,7 +511,7 @@ impl<'a> Rpkiv1PublicationPointRunner<'a> {
fn current_hash_for_uri(&self, uri: &str) -> Option<[u8; 32]> {
if let Some(index) = self.current_repo_index.as_ref() {
if let Ok(index) = index.lock() {
if let Ok(index) = index.read() {
if let Some(entry) = index.get_by_uri(uri) {
return Some(entry.current_hash);
}
@@ -760,7 +760,7 @@ impl<'a> Rpkiv1PublicationPointRunner<'a> {
fn current_manifest_hash_hex_for_audit(&self, ca: &CaInstanceHandle) -> Option<String> {
if let Some(index_handle) = self.current_repo_index.as_ref()
&& let Ok(index) = index_handle.lock()
&& let Ok(index) = index_handle.read()
&& let Some(entry) = index.get_by_uri(&ca.manifest_rsync_uri)
{
return Some(entry.current_hash_hex.clone());