diff --git a/query-engine/driver-adapters/src/proxy.rs b/query-engine/driver-adapters/src/proxy.rs index 50e2223d40e7..0a43ecafaa36 100644 --- a/query-engine/driver-adapters/src/proxy.rs +++ b/query-engine/driver-adapters/src/proxy.rs @@ -211,8 +211,8 @@ macro_rules! impl_send_sync_on_wasm { // Assume the proxy object will not be sent to service workers, we can unsafe impl Send + Sync. impl_send_sync_on_wasm!(TransactionProxy); +impl_send_sync_on_wasm!(JsTransaction); impl_send_sync_on_wasm!(TransactionContextProxy); +impl_send_sync_on_wasm!(JsTransactionContext); impl_send_sync_on_wasm!(DriverProxy); impl_send_sync_on_wasm!(CommonProxy); -impl_send_sync_on_wasm!(JsTransaction); -impl_send_sync_on_wasm!(JsTransactionContext); diff --git a/query-engine/driver-adapters/src/transaction.rs b/query-engine/driver-adapters/src/transaction.rs index 129c9fd507fe..ed7752f22408 100644 --- a/query-engine/driver-adapters/src/transaction.rs +++ b/query-engine/driver-adapters/src/transaction.rs @@ -1,3 +1,5 @@ +use std::future::Future; + use async_trait::async_trait; use metrics::decrement_gauge; use quaint::{ @@ -22,9 +24,13 @@ impl JsTransactionContext { Self { inner, tx_ctx_proxy } } - pub async fn start_transaction(&self) -> quaint::Result> { - self.tx_ctx_proxy.start_transaction().await + pub fn start_transaction(&self) -> UnsafeFuture>> + '_> { + UnsafeFuture(self.tx_ctx_proxy.start_transaction()) } + + // pub async fn start_transaction(&self) -> quaint::Result> { + // self.tx_ctx_proxy.start_transaction().await + // } } #[async_trait]