Skip to content

Commit 3bf0a5e

Browse files
authored
Merge pull request #1579 from Phala-Network/connect-sidevm-rcu
pruntime: Allow HTTP proxy to sidevm when syncing chain state
2 parents 9a91c53 + eed14f3 commit 3bf0a5e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/phactory/src/prpc_service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,7 @@ impl<Platform: pal::Platform> RpcService<Platform> {
13151315
let guard = self.phactory.lock().unwrap();
13161316
debug!(target: "phactory::lock", "Locked phactory");
13171317
if !allow_rcu && guard.rcu_dispatching {
1318+
warn!(target: "phactory::lock", "RCU in progress, returning error");
13181319
return Err(from_display(
13191320
"RCU in progress, please try the request again later",
13201321
));

standalone/pruntime/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub(crate) async fn ecall_connect_sidevm(
9191
let contract_id = hex::decode(id.trim_start_matches("0x"))
9292
.map_err(|err| (Status::BadRequest, err.to_string()))?;
9393
let Some(command_tx) = APPLICATION
94-
.lock_phactory(false, false)
94+
.lock_phactory(true, false)
9595
.map_err(|err| (Status::InternalServerError, err.to_string()))?
9696
.sidevm_command_sender(&contract_id)
9797
else {

0 commit comments

Comments
 (0)