From 59556790ba62011a00995b733864799dc803872d Mon Sep 17 00:00:00 2001 From: ad hoc Date: Fri, 28 Jul 2023 11:40:49 +0200 Subject: [PATCH] add missing block_in_place --- libsqlx-server/src/allocation/primary/mod.rs | 4 +++- libsqlx-server/src/allocation/replica.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libsqlx-server/src/allocation/primary/mod.rs b/libsqlx-server/src/allocation/primary/mod.rs index 606171c9..ee9e0d96 100644 --- a/libsqlx-server/src/allocation/primary/mod.rs +++ b/libsqlx-server/src/allocation/primary/mod.rs @@ -320,7 +320,9 @@ impl ConnectionHandler for PrimaryConnection { async fn handle_conn_message(&mut self, msg: ConnectionMessage) { match msg { ConnectionMessage::Execute { pgm, builder } => { - self.conn.execute_program(&pgm, builder).unwrap() + block_in_place(|| { + self.conn.execute_program(&pgm, builder).unwrap() + }) } ConnectionMessage::Describe => { todo!() diff --git a/libsqlx-server/src/allocation/replica.rs b/libsqlx-server/src/allocation/replica.rs index a31c8116..b1422e5b 100644 --- a/libsqlx-server/src/allocation/replica.rs +++ b/libsqlx-server/src/allocation/replica.rs @@ -172,6 +172,7 @@ impl Replicator { } async fn query_replicate(&mut self) { + tracing::debug!("seinding replication request"); self.req_id += 1; self.next_seq = 0; // clear buffered, uncommitted frames