20260801 并行控制面:stage worker池+CurrentRepoIndex RwLock化,--control-plane-stage-workers开关默认关闭(#138)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user